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: <87r1ku69j1.fsf@nanos.tec.linutronix.de>
Date:   Thu, 04 Mar 2021 19:47:30 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Mike Galbraith <efault@....de>,
        Ben Hutchings <ben@...adent.org.uk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
        torvalds@...ux-foundation.org, stable@...r.kernel.org,
        Lee Jones <lee.jones@...aro.org>,
        "Luis Claudio R. Goncalves" <lgoncalv@...hat.com>, lwn@....net,
        jslaby@...e.cz
Subject: Re: futex breakage in 4.9 stable branch

On Thu, Mar 04 2021 at 10:12, Mike Galbraith wrote:
> On Mon, 2021-03-01 at 18:29 +0100, Ben Hutchings wrote:
>
> --- a/kernel/futex.c
> +++ b/kernel/futex.c
> @@ -874,8 +874,12 @@ static void free_pi_state(struct futex_p
>  	 * and has cleaned up the pi_state already
>  	 */
>  	if (pi_state->owner) {
> +		unsigned long flags;
> +
> +		raw_spin_lock_irqsave(&pi_state->pi_mutex.wait_lock, flags);
>  		pi_state_update_owner(pi_state, NULL);
>  		rt_mutex_proxy_unlock(&pi_state->pi_mutex);
> +             raw_spin_unlock_irqrestore(&pi_state->pi_mutex.wait_lock, flags);

This hunk is missing in 4.9 as well.

>  	}
>
>  	if (current->pi_state_cache)
> @@ -1406,7 +1410,7 @@ static int wake_futex_pi(u32 __user *uad
>  	if (pi_state->owner != current)
>  		return -EINVAL;
>
> -	raw_spin_lock(&pi_state->pi_mutex.wait_lock);
> +	raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock);
>  	new_owner = rt_mutex_next_owner(&pi_state->pi_mutex);
>
>  	/*

That looks correct.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ