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:	Tue, 01 Aug 2006 17:07:36 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Darren Hart <dvhltc@...ibm.com>
Cc:	Esben Nielsen <nielsen.esben@...glemail.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [-rt] Fix race condition and following BUG in PI-futex

On Tue, 2006-08-01 at 13:22 -0700, Darren Hart wrote:

> > >
> > >   	list_del_init(&pi_state->owner->pi_state_list);
> > >   	list_add(&pi_state->list, &new_owner->pi_state_list);
> > >   	pi_state->owner = new_owner;
> > > +	atomic_inc(&pi_state->refcount);
> >
> > There really needs to be a get_pi_state() or some variant. Having to do
> > a manual atomic_inc is very dangerous.
> 
> I understand the need to grab the wait_lock in order to serialize 
> rt_mutex_next_owner(), but why the addition of of the atomic_inc() and the 
> free_pi_state() ?  And if we do need them, shouldn't we place them around the 
> use of the pi_state, rather than just before the unlock calls?

Hmm, is the inc really needed?  The hb->lock is held through this and
the pi_state can't go away while that lock is held.

-- Steve


-
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