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]
Date:	Thu, 14 Apr 2016 17:44:56 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Romain Perier <romain.perier@...e-electrons.com>
Cc:	Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-arch@...r.kernel.org, stable@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Subject: Re: [PATCH] asm-generic/futex: Properly re-enable preemption in
 futex_atomic_cmpxchg_inatomic()

On Thu, Apr 14, 2016 at 03:36:03PM +0200, Romain Perier wrote:
> Fixes: d9b9ff8c1889 ("sched/preempt, futex: Disable preemption in UP futex_atomic_cmpxchg_inatomic() explicitly")
> Signed-off-by: Romain Perier <romain.perier@...e-electrons.com>
> ---
>  include/asm-generic/futex.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h
> index e56272c..bf2d34c 100644
> --- a/include/asm-generic/futex.h
> +++ b/include/asm-generic/futex.h
> @@ -108,11 +108,15 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
>  	u32 val;
>  
>  	preempt_disable();
> -	if (unlikely(get_user(val, uaddr) != 0))
> +	if (unlikely(get_user(val, uaddr) != 0)) {
> +		preempt_enable();
>  		return -EFAULT;
> +	}
>  
> -	if (val == oldval && unlikely(put_user(newval, uaddr) != 0))
> +	if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) {
> +		preempt_enable();
>  		return -EFAULT;
> +	}
>  
>  	*uval = val;
>  	preempt_enable();

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ