From: Will Deacon Subject: Re: [PATCH v9 1/6] MCS Lock: Barrier corrections Date: Wed, 22 Jan 2014 10:13:01 +0000 Message-ID: <20140122101301.GA1621@mudshark.cambridge.arm.com> References: <1390347353.3138.62.camel@schen9-DESK> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1390347353.3138.62.camel@schen9-DESK> Sender: owner-linux-mm@kvack.org To: Tim Chen Cc: Ingo Molnar , Andrew Morton , Thomas Gleixner , "Paul E.McKenney" , "linux-kernel@vger.kernel.org" , linux-mm , "linux-arch@vger.kernel.org" , Linus Torvalds , Waiman Long , Andrea Arcangeli , Alex Shi , Andi Kleen , Michel Lespinasse , Davidlohr Bueso , Matthew R Wilcox , Dave Hansen , Peter Zijlstra , Rik van Riel , Peter Hurley , Raghavendra K T George Spelvin List-Id: linux-arch.vger.kernel.org On Tue, Jan 21, 2014 at 11:35:53PM +0000, Tim Chen wrote: > From: Waiman Long > > This patch corrects the way memory barriers are used in the MCS lock > with smp_load_acquire and smp_store_release fucnctions. The previous > barriers could leak critical sections if mcs lock is used by itself. > It is not a problem when mcs lock is embedded in mutex but will be an > issue when the mcs_lock is used elsewhere. > > The patch removes the incorrect barriers and put in correct > barriers with the pair of functions smp_load_acquire and smp_store_release. > > Suggested-by: Michel Lespinasse > Reviewed-by: Paul E. McKenney > Signed-off-by: Waiman Long > Signed-off-by: Jason Low > Signed-off-by: Tim Chen > --- > kernel/locking/mutex.c | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) Reviewed-by: Will Deacon Will -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org