Michal Hocko wrote:
> From: Michal Hocko <[email protected]>
> 
> bb29902a7515 ("oom, oom_reaper: protect oom_reaper_list using simpler
> way") has simplified the check for tasks already enqueued for the oom
> reaper by checking tsk->oom_reaper_list != NULL. This check is not
> sufficient because the tsk might be the head of the queue without any
> other tasks queued and then we would simply lockup looping on the same
> task. Fix the condition by checking for the head as well.

Indeed, oom_reaper_list is initially NULL.

> 
> Fixes: bb29902a7515 ("oom, oom_reaper: protect oom_reaper_list using simpler 
> way")
> Signed-off-by: Michal Hocko <[email protected]>
Acked-by: Tetsuo Handa <[email protected]>

> ---
> Hi,
> I have just noticed this after I started consolidating other oom_reaper
> related changes I have here locally. I should have caught this during
> the review already and I really feel ashamed I haven't because this is
> really a trivial bug that should be obvious see...

Reply via email to