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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 31 May 2007 09:48:27 -0700
From:	john stultz <johnstul@...ibm.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>,
	Sripathi Kodi <sripathik@...ibm.com>,
	Oleg Nesterov <oleg@...sign.ru>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>
Subject: Re: [BUG] futex_unlock_pi() hurts my brain and may cause
	application deadlock

On Thu, 2007-05-31 at 16:55 +0200, Ingo Molnar wrote:
> * john stultz <johnstul@...ibm.com> wrote:
> 
> > > > --- a/kernel/futex.c
> > > > +++ b/kernel/futex.c
> > > > @@ -2011,6 +2011,7 @@ pi_faulted:
> > > >  					 attempt);
> > > >  		if (ret)
> > > >  			goto out_unlock;
> > > > +		uval = 0;
> > > >  		goto retry_locked;
> > > 
> > > this looks good to me. Oleg has posted a few more fixes as well - 
> > > have you tried those too?
> > 
> > Do you have a URL or subject line for the discussion? I'll take a look 
> > and give them a whirl.
> 
> i meant to say Alexey, not Oleg :-) Here's the thread:
> 
>    http://lkml.org/lkml/2007/5/7/129
> 
> i've Cc:-ed Alexey too.

I haven't had a chance to run it, but reviewing at Alexey's changes,
they do not look to be sufficient to the issue we were hitting. We still
need to clear uval to avoid  -EFAULT &'ing w/ FUTEX_OWNER_DIED.


Here's the patch against -rt9 (which also contains Alexey's fix)


diff -rup 2.6-rt/kernel/futex.c 2.6-rtnew/kernel/futex.c
--- 2.6-rt/kernel/futex.c	2007-05-31 06:38:00.000000000 -0500
+++ 2.6-rtnew/kernel/futex.c	2007-05-31 06:43:08.000000000 -0500
@@ -1954,6 +1954,7 @@ pi_faulted:
 			ret = -EFAULT;
 			goto out_unlock;
 		}
+		uval = 0;
 		goto retry_locked;
 	}
 
@@ -3503,6 +3504,7 @@ pi_faulted:
 			ret = -EFAULT;
 			goto out_unlock;
 		}
+		uval = 0;
 		goto retry_locked;
 	}
 



-
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