Re: [PATCH] oom, oom_reaper: Do not enqueue task if it is on the oom_reaper_list head

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michal Hocko wrote:
> From: Michal Hocko <mhocko@xxxxxxxx>
> 
> 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 <mhocko@xxxxxxxx>
Acked-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>

> ---
> 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...

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]