Skip to content
  • Nick Piggin's avatar
    [PATCH] oom: handle current exiting · 50ec3bbf
    Nick Piggin authored
    
    
    If current *is* exiting, it should actually be allowed to access reserved
    memory rather than OOM kill something else.  Can't do this via a straight
    check in page_alloc.c because that would allow multiple tasks to use up
    reserves.  Instead cause current to OOM-kill itself which will mark it as
    TIF_MEMDIE.
    
    The current procedure of simply aborting the OOM-kill if a task is exiting can
    lead to OOM deadlocks.
    
    In the case of killing a PF_EXITING task, don't make a lot of noise about it.
    This becomes more important in future patches, where we can "kill" OOM_DISABLE
    tasks.
    
    Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    50ec3bbf