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]
Message-ID: <ZafC_YkTJKsOropE@localhost.localdomain>
Date: Wed, 17 Jan 2024 13:07:25 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: Zqiang <qiang.zhang1211@...il.com>
Cc: paulmck@...nel.org, quic_neeraju@...cinc.com, joel@...lfernandes.org,
	rcu@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcu/nocb: Check rdp_gp->nocb_timer in
 __call_rcu_nocb_wake()

Le Wed, Jan 17, 2024 at 06:26:16PM +0800, Zqiang a écrit :
> Currently, only rdp_gp->nocb_timer is used, for nocb_timer of
> no-rdp_gp structure, the timer_pending() is always return false,
> this commit therefore need to check rdp_gp->nocb_timer in
> __call_rcu_nocb_wake().
> 
> Signed-off-by: Zqiang <qiang.zhang1211@...il.com>
> ---
>  kernel/rcu/tree_nocb.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
> index 54971afc3a9b..3f85577bddd4 100644
> --- a/kernel/rcu/tree_nocb.h
> +++ b/kernel/rcu/tree_nocb.h
> @@ -564,6 +564,7 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
>  	long lazy_len;
>  	long len;
>  	struct task_struct *t;
> +	struct rcu_data *rdp_gp = rdp->nocb_gp_rdp;
>  
>  	// If we are being polled or there is no kthread, just leave.
>  	t = READ_ONCE(rdp->nocb_gp_kthread);
> @@ -608,7 +609,7 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
>  		smp_mb(); /* Enqueue before timer_pending(). */
>  		if ((rdp->nocb_cb_sleep ||
>  		     !rcu_segcblist_ready_cbs(&rdp->cblist)) &&
> -		    !timer_pending(&rdp->nocb_timer)) {
> +		    !timer_pending(&rdp_gp->nocb_timer)) {

Hehe, good eyes ;-)

I had that change in mind but while checking that area further I actually
wondered what is the actual purpose of this RCU_NOCB_WAKE_FORCE thing. If
we reach that place, it means that the nocb_gp kthread should be awaken
already (or the timer pending), so what does a force wake up solve in that
case?

Paul, any recollection of that?

In the meantime:

Reviewed-by: Frederic Weisbecker <frederic@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ