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] [day] [month] [year] [list]
Message-ID: <20241008105000._zQhLQk4@linutronix.de>
Date: Tue, 8 Oct 2024 12:50:00 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
	mingo@...hat.com, will@...nel.org, longman@...hat.com,
	boqun.feng@...il.com
Subject: Re: [PATCH] locking/rtmutex: Fix misleading comment

On 2024-10-08 11:26:06 [+0200], Peter Zijlstra wrote:
> 
> Going through the RCU-boost and rtmutex code, I ran into this utterly
> confusing comment. Fix it to avoid confusing future readers.

Correct.

Reviewed-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>

> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> diff --git a/kernel/locking/rtmutex_api.c b/kernel/locking/rtmutex_api.c
> index a6974d044593..587ede8073c0 100644
> --- a/kernel/locking/rtmutex_api.c
> +++ b/kernel/locking/rtmutex_api.c
> @@ -175,7 +175,7 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex_base *lock,
>  	}
>  
>  	/*
> -	 * We've already deboosted, mark_wakeup_next_waiter() will
> +	 * This will deboost, mark_wakeup_next_waiter() will
  +	 * mark_wakeup_next_waiter() will deboost and
>  	 * retain preempt_disabled when we drop the wait_lock, to
>  	 * avoid inversion prior to the wakeup.  preempt_disable()
>  	 * therein pairs with rt_mutex_postunlock().

This could make it obvious that mark_wakeup_next_waiter() does all the
things.

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ