* Re: + oom-sacrifice-child-with-highest-badness-score-for-parent-protect-dereferencing-of-tasks-comm.patch added to -mm tree
[not found] <201006092141.o59LfE9Z023291@imap1.linux-foundation.org>
@ 2010-06-17 1:51 ` KOSAKI Motohiro
0 siblings, 0 replies; only message in thread
From: KOSAKI Motohiro @ 2010-06-17 1:51 UTC (permalink / raw)
To: linux-kernel; +Cc: kosaki.motohiro, rientjes, akpm, balbir, oleg
>
> The patch titled
> oom: protect dereferencing of task's comm
> has been added to the -mm tree. Its filename is
> oom-sacrifice-child-with-highest-badness-score-for-parent-protect-dereferencing-of-tasks-comm.patch
>
> Before you just go and hit "reply", please:
> a) Consider who else should be cc'ed
> b) Prefer to cc a suitable mailing list as well
> c) Ideally: find the original patch on the mailing list and do a
> reply-to-all to that, adding suitable additional cc's
>
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>
> See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
> out what to do about this
>
> The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
>
> ------------------------------------------------------
> Subject: oom: protect dereferencing of task's comm
> From: David Rientjes <rientjes@google.com>
>
> Andrew notes that dereferencing task->comm is unsafe without holding
> task_lock(task). That's true even when dealing with current, so all
> existing dereferences within the oom killer need to ensure they are
> holding task_lock() before doing so.
>
> This avoids using get_task_comm() because we'd otherwise need to allocate
> a string of TASK_COMM_LEN on the stack (or add synchronization and use a
> global string) and we don't want to do that because page allocations, and
> thus the oom killer, can happen particularly deep in the stack.
>
> Reported-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: David Rientjes <rientjes@google.com>
> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: Balbir Singh <balbir@in.ibm.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-17 1:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <201006092141.o59LfE9Z023291@imap1.linux-foundation.org>
2010-06-17 1:51 ` + oom-sacrifice-child-with-highest-badness-score-for-parent-protect-dereferencing-of-tasks-comm.patch added to -mm tree KOSAKI Motohiro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®