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: <4D826863.2040406@linux.intel.com>
Date:	Thu, 17 Mar 2011 13:00:35 -0700
From:	Darren Hart <dvhart@...ux.intel.com>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Richard Weinberger <richard@....at>
Subject: Re: [PATCH 2/2] futex: Fix WARN_ON() test for UP

On 03/17/2011 12:21 PM, Steven Rostedt wrote:
> From: Steven Rostedt<srostedt@...hat.com>
>
> An update of the futex code had a
>
> 	WARN_ON(!spin_is_locked(q->lock_ptr))
>
> But on UP, spin_is_locked() is always false, and will
> trigger this warning, and even worse, it will exit the function
> without doing the necessary work.
>
> Converting this to a WARN_ON_SMP() fixes the problem.
>
> Reported-by: Richard Weinberger<richard@....at>
> Tested-by: Richard Weinberger<richard@....at>
> Signed-off-by: Steven Rostedt<rostedt@...dmis.org>

Acked-by: Darren Hart <dvhart@...ux.intel.com>


> ---
>   kernel/futex.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/futex.c b/kernel/futex.c
> index 9fe9131..850d00b 100644
> --- a/kernel/futex.c
> +++ b/kernel/futex.c
> @@ -785,8 +785,8 @@ static void __unqueue_futex(struct futex_q *q)
>   {
>   	struct futex_hash_bucket *hb;
>
> -	if (WARN_ON(!q->lock_ptr || !spin_is_locked(q->lock_ptr)
> -			|| plist_node_empty(&q->list)))
> +	if (WARN_ON_SMP(!q->lock_ptr || !spin_is_locked(q->lock_ptr))
> +	    || WARN_ON(plist_node_empty(&q->list)))
>   		return;
>
>   	hb = container_of(q->lock_ptr, struct futex_hash_bucket, lock);
> -- 1.7.2.3 -- 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/

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
--
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