lkml.org 
[lkml]   [2021]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] mm: Mark the OOM reaper thread as freezable
    Date
    From: Sultan Alsawaf <sultan@kerneltoast.com>

    The OOM reaper thread uses wait_event_freezable() without actually being
    marked as freezable. Fix it by adding a set_freezable() call.

    Fixes: aac453635549 ("mm, oom: introduce oom reaper")
    Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
    ---
    mm/oom_kill.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/mm/oom_kill.c b/mm/oom_kill.c
    index 831340e7ad8b..46a742b57735 100644
    --- a/mm/oom_kill.c
    +++ b/mm/oom_kill.c
    @@ -641,6 +641,8 @@ static void oom_reap_task(struct task_struct *tsk)

    static int oom_reaper(void *unused)
    {
    + set_freezable();
    +
    while (true) {
    struct task_struct *tsk = NULL;

    --
    2.33.0
    \
     
     \ /
      Last update: 2021-09-19 01:41    [W:2.820 / U:0.216 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site