[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1601272105060.3886@nanos>
Date: Wed, 27 Jan 2016 21:10:02 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Davidlohr Bueso <dbueso@...e.de>
cc: Mel Gorman <mgorman@...hsingularity.net>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Chris Mason <clm@...com>, Darren Hart <dvhart@...ux.intel.com>,
dave@...olabs.net, linux-kernel@...r.kernel.org,
Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH v4] futex: Remove requirement for lock_page in
get_futex_key
On Sat, 23 Jan 2016, Davidlohr Bueso wrote:
> + if (unlikely(!mapping)) {
> + int shmem_swizzled;
> +
> + /*
> + * Page lock is required to identify which special case above
> + * applies. If this is really a shmem page then the page lock
> + * will prevent unexpected transitions.
> + */
> + lock_page(page);
> + shmem_swizzled = PageSwapCache(page);
> unlock_page(page);
> put_page(page);
> + WARN_ON_ONCE(READ_ONCE(page->mapping));
You just did put_page(page). So dereferencing page is a nono. This needs to be
flipped around.
Thanks,
tglx
Powered by blists - more mailing lists