[lkml]   [2000]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: buggy GFP_KERNEL allocators
       Date:   Thu, 27 Jan 2000 09:57:29 +0100 (CET)
    From: Andrea Arcangeli <>

    I think the real fix for 2.2.15pre is this:

    I don't know if this is a great idea...

    - /*
    - * If we can schedule, do so, and make sure to yield.
    - * We may be a real-time process, and if kswapd is
    - * waiting for us we need to allow it to run a bit.
    - */
    - if (gfp_mask & __GFP_WAIT) {
    - current->policy |= SCHED_YIELD;
    - schedule();
    - }
    return 0;

    Doing such schedule make no sense at all. Each caller should have a fail
    path that giveups.

    Actually there is one place which cannot fail, allocation of the
    final FIN frame in TCP. It may never fail, it will loop until
    it gets the memory.

    I _know_ this is broken, and I want to fix it in 2.3.x but I cannot
    safely fix that issue in 2.2.x at all. The issue is that the way
    things are architected in 2.2.x there is no simple way to retry a FIN
    later after allocation failure nor forego the FIN altogether. All
    available failure schemes in that piece of code would result in a
    dead unkillable socket.

    Andrea, please find another way.

    David S. Miller

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

     \ /
      Last update: 2005-03-22 13:56    [W:0.020 / U:2.752 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site