[lkml]   [2001]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Deadlock in 2.2 sock_alloc_send_skb?
    On Thu, May 10, 2001 at 07:30:47PM +0200, Andi Kleen wrote:
    > On Thu, May 10, 2001 at 01:57:49PM +0100, Alan Cox wrote:
    > > > If that happens, and the socket uses GFP_ATOMIC allocation, the while (1)
    > > > loop in sock_alloc_send_skb() will endlessly spin, without ever calling
    > > > schedule(), and all the time holding the kernel lock ...
    > >
    > > If the socket is using GFP_ATOMIC allocation it should never loop. That is
    > > -not-allowed-.
    > It is just not clear why any socket should use GFP_ATOMIC. I can understand
    > it using GFP_BUFFER e.g. for nbd, but GFP_ATOMIC seems to be rather radical
    > and fragile.

    side note, the only legal use of GFP_ATOMIC in sock_alloc_send_skb is
    with noblock set and fallback zero, remeber GFP_BUFFER will sleep, it
    may not sleep in vanilla 2.2.19 but the necessary lowlatency hooks in
    the memory balancing that for example I have on my 2.2 tree will make it
    to sleep.

    The patch self contained looks perfect (I didn't checked that the
    callers are happy with a -ENOMEM errorcode though), if alloc_skb()
    failed that's a plain -ENOMEM. The caller must _not_ try again, they
    must take a recovery fail path instead.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:52    [W:0.022 / U:5.268 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site