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 <t...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to