[lkml]   [2012]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 6/6] kmod: make __request_module() killable
    On 02/15, Andrew Morton wrote:
    > On Tue, 14 Feb 2012 17:49:14 +0100
    > Oleg Nesterov <> wrote:
    > > As Tetsuo Handa pointed out, request_module() can stress the
    > > system while the oom-killed caller sleeps in TASK_UNINTERRUPTIBLE.
    > Whine.
    > Solving this problem is the entire point of the entire patchset and you
    > told us almost nothing about it. Please, provide a complete
    > description of the problem which is being solved, so we can understand
    > the value of the patchset?

    I did ;) from the message I sent to security list:

    Tetsuo has the test-cases, but the problem (well, one of the problems) is

    The task T uses "almost all" memory, then it does something which triggers
    request_module(). Say, it can simply call sys_socket(). This in turn needs
    more memory and leads to OOM. oom-killer correctly chooses T and kills it,
    but this can't help because it sleeps in TASK_UNINTERRUPTIBLE and after
    that oom-killer becomes "disabled" by the TIF_MEMDIE task T.

    Credits to Tetsuo.

    But in fact I think this change is "obviously good" anyway. Assuming
    it is correct of course. request_module() is heavy, it can take the
    unpredictable amount of time/resources to finish. It is not good we
    can't interrupt the task which waits for completion.

    Yes, this adds some complications and initially I wasn't agree with
    Tetsuo, I thought this doesn't worth the trouble. But I hope that
    this code is simple/clean enough.

    Btw, there is another example of "unbounded" sleep in UNINTERRUPTIBLE,
    vfork. I already have the patches, will send today.


     \ /
      Last update: 2012-02-16 16:13    [W:0.023 / U:183.772 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site