Re: [PATCH 1/2] break out page allocation warning code
From: David Rientjes
Date: Tue Apr 19 2011 - 17:23:49 EST
On Mon, 18 Apr 2011, Dave Hansen wrote:
> > It shouldn't be a follow-on patch since you're introducing a new feature
> > here (vmalloc allocation failure warnings) and what I'm identifying is a
> > race in the access to current->comm. A bug fix for a race should always
> > preceed a feature that touches the same code.
>
> Dude. Seriously. Glass house! a63d83f4
>
Not sure what you're implying here. The commit you've identified is the
oom killer rewrite and the oom killer is very specific about making sure
to always hold task_lock() whenever dereferencing ->comm, even for
current, to guard against /proc/pid/comm or prctl(). The oom killer is
different from your usecase, however, because we can always take
task_lock(current) in the oom killer because it's in a blockable context,
whereas page allocation warnings can occur in a superset.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/