lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090219112212.GQ2354@elte.hu>
Date:	Thu, 19 Feb 2009 12:22:12 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH] mutex: enable spinning for DEBUG_MUTEX


* Peter Zijlstra <peterz@...radead.org> wrote:

> Subject: mutex: enable spinning for DEBUG_MUTEX
> From: Johannes Weiner <hannes@...xchg.org>
> Date: Thu, 15 Jan 2009 15:57:38 +0100
> 
> Spinning with CONFIG_DEBUG_MUTEX is possible but care must be taken
> with the debug checks vs. racy access to the lock owner field.
> 
> In the case where the lock owner gets rescheduled after acquisition
> and therefor unlocks on another CPU, that second CPU might not see the
> write of the owner field from the first CPU and we warn about owner
> mismatch.  Thus the memory barriers for the debug case.
> 
> Also remove the redundant mutex_set_owner()s in __mutex_lock_common()
> and __mutex_trylock_slowpath(), it's taken care of in mutex_lock() and
> mutex_trylock().
> 
> [a.p.zijlstra@...llo.nl: fix _nested variants]
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> ---
>  kernel/mutex-debug.c |    6 ++++++
>  kernel/mutex-debug.h |    6 ++++++
>  kernel/mutex.c       |   27 +++++++++++++++------------
>  3 files changed, 27 insertions(+), 12 deletions(-)

Applied to tip:core/locking, thanks Peter!

	Ingo
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ