lkml.org 
[lkml]   [2015]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@linutronix.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


\
 
 \ /
  Last update: 2015-12-20 09:01    [W:0.055 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site