Re: [patch V3 58/64] futex: Clarify comment in futex_requeue()

Thomas Gleixner
2021-08-09T08:18:43Z

On Sun, Aug 08 2021 at 11:43, Davidlohr Bueso wrote:

> On Thu, 05 Aug 2021, Thomas Gleixner wrote:
>
>>From: Thomas Gleixner <tglx@linutronix.de>
>>
>>The comment about the restriction of the number of waiters to wake for the
>>REQUEUE_PI case is confusing at best. Rewrite it.
>
> This certainly reads better.
>
>>
>>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>>---
>> kernel/futex.c | 28 ++++++++++++++++++++--------
>> 1 file changed, 20 insertions(+), 8 deletions(-)
>>---
>>--- a/kernel/futex.c
>>+++ b/kernel/futex.c
>>@@ -1960,15 +1960,27 @@ static int futex_requeue(u32 __user *uad
>> */
>> if (refill_pi_state_cache())
>> return -ENOMEM;
>
> Perhaps this can be moved after the nr_wake check below? No sense
> in calling refill_pi_state_cache() if the user is passing bogus
> parameters.

Yes.