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:	Sat, 19 Dec 2015 23:41:55 -0800
From:	Darren Hart <dvhart@...radead.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Darren Hart <darren@...art.com>,
	Davidlohr Bueso <dave@...olabs.net>,
	Bhuvanesh_Surachari@...tor.com, Andy Lowe <Andy_Lowe@...tor.com>
Subject: Re: [patch 3/5] futex: Document pi_state refcounting in requeue code

On Sat, Dec 19, 2015 at 08:07:39PM -0000, Thomas Gleixner wrote:
> Documentation of the pi_state refcounting in the requeue code is non
> existent. Add it.
> 

OK, one nitpic on this one I guess - 80 characters is pretty narrow as it is in
my humble opinion, could we expand the newly added comment blocks to use all of
the 80 character limit?

> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  kernel/futex.c |   36 +++++++++++++++++++++++++++++++++---
>  1 file changed, 33 insertions(+), 3 deletions(-)
> 
> --- a/kernel/futex.c
> +++ b/kernel/futex.c

...

> -				/* We got the lock. */
> +				/*
> +				 * We got the lock. We do neither drop
> +				 * the refcount on pi_state nor clear
> +				 * this->pi_state because the waiter
> +				 * needs the pi_state for cleaning up
> +				 * the user space value. It will drop
> +				 * the refcount after doing so.
> +				 */
>  				requeue_pi_wake_futex(this, &key2, hb2);
>  				drop_count++;
>  				continue;
>  			} else if (ret) {
> -				/* -EDEADLK */
> +				/*
> +				 * rt_mutex_start_proxy_lock()
> +				 * detected a potential deadlock when
> +				 * we tried to queue that waiter. Drop
> +				 * the pi_state reference which we
> +				 * took above and remove the pointer
> +				 * to the state from the waiters
> +				 * futex_q object.
> +				 */

Especially the two paragraphs above ^

-- 
Darren Hart
Intel Open Source Technology Center
--
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