[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1210081344440.18768@chino.kir.corp.google.com>
Date: Mon, 8 Oct 2012 13:46:38 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Dave Jones <davej@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
bhutchings@...arflare.com, linux-mm@...ck.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: mpol_to_str revisited.
On Mon, 8 Oct 2012, Dave Jones wrote:
> If pol->mode was poisoned, that smells like we have a race where policy is getting freed
> while another process is reading it.
>
> Am I missing something, or is there no locking around that at all ?
>
The only thing that is held during the read() is a reference to the
task_struct so it doesn't disappear from under us. The protection needed
for a task's mempolicy, however, is task_lock() and that is not held.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists