2024-05-09 07:41:10

by Zqiang

[permalink] [raw]
Subject: [PATCH] rcu/nocb: Fix using smp_processor_id() in preemptible warning

Currently, the this_cpu_ptr(&rcu_data) in rcu_rdp_is_offloaded() is called
before the condition "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())"
is checked, and occurs in preemptible task context, this will trigger the
following warning.

[ 4.106221][ T18] BUG: using smp_processor_id() in preemptible [00000000] code: rcuop/0/18
[ 4.107796][ T18] caller is debug_smp_processor_id (lib/smp_processor_id.c:61)
[ 4.108547][ T18] CPU: 0 PID: 18 Comm: rcuop/0 Not tainted 6.9.0-rc2-00079-g4c66bc7cacc0 #1
[ 4.109667][ T18] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 4.111064][ T18] Call Trace:
[ 4.111064][ T18] <TASK>
[ 4.111064][ T18] dump_stack_lvl (lib/dump_stack.c:116)
[ 4.111064][ T18] dump_stack (lib/dump_stack.c:124)
[ 4.111064][ T18] check_preemption_disabled (arch/x86/include/asm/preempt.h:84 (discriminator 15) lib/smp_processor_id.c:53 (discriminator 15))
[ 4.111064][ T18] debug_smp_processor_id (lib/smp_processor_id.c:61)
[ 4.111064][ T18] rcu_rdp_is_offloaded (kernel/rcu/tree_plugin.h:27 (discriminator 1))
[ 4.111064][ T18] nocb_cb_wait (kernel/rcu/tree_nocb.h:936 (discriminator 2))
[ 4.111064][ T18] rcu_nocb_cb_kthread (kernel/rcu/tree_nocb.h:983 (discriminator 1))
[ 4.111064][ T18] ? nocb_cb_wait (kernel/rcu/tree_nocb.h:976)
[ 4.111064][ T18] kthread (kernel/kthread.c:388)
[ 4.111064][ T18] ? kthread (kernel/kthread.c:373 (discriminator 2))
[ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
[ 4.111064][ T18] ret_from_fork (arch/x86/kernel/process.c:153)
[ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
[ 4.111064][ T18] ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
[ 4.111064][ T18] </TASK>

This commit fix this warning by priority check the condition
"!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())" , to
ensure whether the this_cpu_ptr(&rcu_data) can be executed in
rcu_rdp_is_offloaded().

Fixes: 8feeeba60711 ("rcu/nocb: Use kthread parking instead of ad-hoc implementation")
Tested-by: kernel test robot <[email protected]>
Signed-off-by: Zqiang <[email protected]>
---
kernel/rcu/tree_plugin.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 340bbefe5f65..1bb73466a8a9 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -28,8 +28,8 @@ static bool rcu_rdp_is_offloaded(struct rcu_data *rdp)
!(lockdep_is_held(&rcu_state.barrier_mutex) ||
(IS_ENABLED(CONFIG_HOTPLUG_CPU) && lockdep_is_cpus_held()) ||
rcu_lockdep_is_held_nocb(rdp) ||
- (rdp == this_cpu_ptr(&rcu_data) &&
- !(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())) ||
+ (!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible()) &&
+ rdp == this_cpu_ptr(&rcu_data)) ||
rcu_current_is_nocb_kthread(rdp)),
"Unsafe read of RCU_NOCB offloaded state"
);
--
2.17.1



2024-05-14 14:54:52

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH] rcu/nocb: Fix using smp_processor_id() in preemptible warning

On Thu, May 09, 2024 at 03:40:46PM +0800, Zqiang wrote:
> Currently, the this_cpu_ptr(&rcu_data) in rcu_rdp_is_offloaded() is called
> before the condition "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())"
> is checked, and occurs in preemptible task context, this will trigger the
> following warning.
>
> [ 4.106221][ T18] BUG: using smp_processor_id() in preemptible [00000000] code: rcuop/0/18
> [ 4.107796][ T18] caller is debug_smp_processor_id (lib/smp_processor_id.c:61)
> [ 4.108547][ T18] CPU: 0 PID: 18 Comm: rcuop/0 Not tainted 6.9.0-rc2-00079-g4c66bc7cacc0 #1
> [ 4.109667][ T18] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> [ 4.111064][ T18] Call Trace:
> [ 4.111064][ T18] <TASK>
> [ 4.111064][ T18] dump_stack_lvl (lib/dump_stack.c:116)
> [ 4.111064][ T18] dump_stack (lib/dump_stack.c:124)
> [ 4.111064][ T18] check_preemption_disabled (arch/x86/include/asm/preempt.h:84 (discriminator 15) lib/smp_processor_id.c:53 (discriminator 15))
> [ 4.111064][ T18] debug_smp_processor_id (lib/smp_processor_id.c:61)
> [ 4.111064][ T18] rcu_rdp_is_offloaded (kernel/rcu/tree_plugin.h:27 (discriminator 1))
> [ 4.111064][ T18] nocb_cb_wait (kernel/rcu/tree_nocb.h:936 (discriminator 2))
> [ 4.111064][ T18] rcu_nocb_cb_kthread (kernel/rcu/tree_nocb.h:983 (discriminator 1))
> [ 4.111064][ T18] ? nocb_cb_wait (kernel/rcu/tree_nocb.h:976)
> [ 4.111064][ T18] kthread (kernel/kthread.c:388)
> [ 4.111064][ T18] ? kthread (kernel/kthread.c:373 (discriminator 2))
> [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> [ 4.111064][ T18] ret_from_fork (arch/x86/kernel/process.c:153)
> [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> [ 4.111064][ T18] ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
> [ 4.111064][ T18] </TASK>
>
> This commit fix this warning by priority check the condition
> "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())" , to
> ensure whether the this_cpu_ptr(&rcu_data) can be executed in
> rcu_rdp_is_offloaded().
>
> Fixes: 8feeeba60711 ("rcu/nocb: Use kthread parking instead of ad-hoc implementation")
> Tested-by: kernel test robot <[email protected]>
> Signed-off-by: Zqiang <[email protected]>

Hearing no objections, I have queued this wordsmithed version. As always,
please let me know if I have messed anything up.

Thanx, Paul

------------------------------------------------------------------------

commit 5271ad1de0fbcf0bd9caebcf721670c164e5fa9c
Author: Zqiang <[email protected]>
Date: Thu May 9 15:40:46 2024 +0800

rcu/nocb: Don't use smp_processor_id() in preemptible code

Currently, rcu_rdp_is_offloaded() invokes this_cpu_ptr(&rcu_data) before
the condition "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())"
is checked. When invoked in preemptible context in preemptible kernels,
this will trigger the following warning:

[ 4.106221][ T18] BUG: using smp_processor_id() in preemptible [00000000] code: rcuop/0/18
[ 4.107796][ T18] caller is debug_smp_processor_id (lib/smp_processor_id.c:61)
[ 4.108547][ T18] CPU: 0 PID: 18 Comm: rcuop/0 Not tainted 6.9.0-rc2-00079-g4c66bc7cacc0 #1
[ 4.109667][ T18] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 4.111064][ T18] Call Trace:
[ 4.111064][ T18] <TASK>
[ 4.111064][ T18] dump_stack_lvl (lib/dump_stack.c:116)
[ 4.111064][ T18] dump_stack (lib/dump_stack.c:124)
[ 4.111064][ T18] check_preemption_disabled (arch/x86/include/asm/preempt.h:84 (discriminator 15) lib/smp_processor_id.c:53 (discriminator 15))
[ 4.111064][ T18] debug_smp_processor_id (lib/smp_processor_id.c:61)
[ 4.111064][ T18] rcu_rdp_is_offloaded (kernel/rcu/tree_plugin.h:27 (discriminator 1))
[ 4.111064][ T18] nocb_cb_wait (kernel/rcu/tree_nocb.h:936 (discriminator 2))
[ 4.111064][ T18] rcu_nocb_cb_kthread (kernel/rcu/tree_nocb.h:983 (discriminator 1))
[ 4.111064][ T18] ? nocb_cb_wait (kernel/rcu/tree_nocb.h:976)
[ 4.111064][ T18] kthread (kernel/kthread.c:388)
[ 4.111064][ T18] ? kthread (kernel/kthread.c:373 (discriminator 2))
[ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
[ 4.111064][ T18] ret_from_fork (arch/x86/kernel/process.c:153)
[ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
[ 4.111064][ T18] ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
[ 4.111064][ T18] </TASK>

This commit therefore fixes this warning by checking the condition
"!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())" before invoking
this_cpu_ptr(), thus avoiding preemptible invocations.

Fixes: 8feeeba60711 ("rcu/nocb: Use kthread parking instead of ad-hoc implementation")
Tested-by: kernel test robot <[email protected]>
Signed-off-by: Zqiang <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 31c539f09c150..475e20ebec5a5 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -28,8 +28,8 @@ static bool rcu_rdp_is_offloaded(struct rcu_data *rdp)
!(lockdep_is_held(&rcu_state.barrier_mutex) ||
(IS_ENABLED(CONFIG_HOTPLUG_CPU) && lockdep_is_cpus_held()) ||
rcu_lockdep_is_held_nocb(rdp) ||
- (rdp == this_cpu_ptr(&rcu_data) &&
- !(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())) ||
+ (!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible()) &&
+ rdp == this_cpu_ptr(&rcu_data)) ||
rcu_current_is_nocb_kthread(rdp)),
"Unsafe read of RCU_NOCB offloaded state"
);

2024-05-14 15:18:25

by Frederic Weisbecker

[permalink] [raw]
Subject: Re: [PATCH] rcu/nocb: Fix using smp_processor_id() in preemptible warning

Le Tue, May 14, 2024 at 07:54:40AM -0700, Paul E. McKenney a ?crit :
> On Thu, May 09, 2024 at 03:40:46PM +0800, Zqiang wrote:
> > Currently, the this_cpu_ptr(&rcu_data) in rcu_rdp_is_offloaded() is called
> > before the condition "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())"
> > is checked, and occurs in preemptible task context, this will trigger the
> > following warning.
> >
> > [ 4.106221][ T18] BUG: using smp_processor_id() in preemptible [00000000] code: rcuop/0/18
> > [ 4.107796][ T18] caller is debug_smp_processor_id (lib/smp_processor_id.c:61)
> > [ 4.108547][ T18] CPU: 0 PID: 18 Comm: rcuop/0 Not tainted 6.9.0-rc2-00079-g4c66bc7cacc0 #1
> > [ 4.109667][ T18] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> > [ 4.111064][ T18] Call Trace:
> > [ 4.111064][ T18] <TASK>
> > [ 4.111064][ T18] dump_stack_lvl (lib/dump_stack.c:116)
> > [ 4.111064][ T18] dump_stack (lib/dump_stack.c:124)
> > [ 4.111064][ T18] check_preemption_disabled (arch/x86/include/asm/preempt.h:84 (discriminator 15) lib/smp_processor_id.c:53 (discriminator 15))
> > [ 4.111064][ T18] debug_smp_processor_id (lib/smp_processor_id.c:61)
> > [ 4.111064][ T18] rcu_rdp_is_offloaded (kernel/rcu/tree_plugin.h:27 (discriminator 1))
> > [ 4.111064][ T18] nocb_cb_wait (kernel/rcu/tree_nocb.h:936 (discriminator 2))
> > [ 4.111064][ T18] rcu_nocb_cb_kthread (kernel/rcu/tree_nocb.h:983 (discriminator 1))
> > [ 4.111064][ T18] ? nocb_cb_wait (kernel/rcu/tree_nocb.h:976)
> > [ 4.111064][ T18] kthread (kernel/kthread.c:388)
> > [ 4.111064][ T18] ? kthread (kernel/kthread.c:373 (discriminator 2))
> > [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> > [ 4.111064][ T18] ret_from_fork (arch/x86/kernel/process.c:153)
> > [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> > [ 4.111064][ T18] ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
> > [ 4.111064][ T18] </TASK>
> >
> > This commit fix this warning by priority check the condition
> > "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())" , to
> > ensure whether the this_cpu_ptr(&rcu_data) can be executed in
> > rcu_rdp_is_offloaded().
> >
> > Fixes: 8feeeba60711 ("rcu/nocb: Use kthread parking instead of ad-hoc implementation")
> > Tested-by: kernel test robot <[email protected]>
> > Signed-off-by: Zqiang <[email protected]>
>
> Hearing no objections, I have queued this wordsmithed version. As always,
> please let me know if I have messed anything up.
>
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> commit 5271ad1de0fbcf0bd9caebcf721670c164e5fa9c
> Author: Zqiang <[email protected]>
> Date: Thu May 9 15:40:46 2024 +0800
>
> rcu/nocb: Don't use smp_processor_id() in preemptible code
>
> Currently, rcu_rdp_is_offloaded() invokes this_cpu_ptr(&rcu_data) before
> the condition "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())"
> is checked. When invoked in preemptible context in preemptible kernels,
> this will trigger the following warning:
>
> [ 4.106221][ T18] BUG: using smp_processor_id() in preemptible [00000000] code: rcuop/0/18
> [ 4.107796][ T18] caller is debug_smp_processor_id (lib/smp_processor_id.c:61)
> [ 4.108547][ T18] CPU: 0 PID: 18 Comm: rcuop/0 Not tainted 6.9.0-rc2-00079-g4c66bc7cacc0 #1
> [ 4.109667][ T18] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> [ 4.111064][ T18] Call Trace:
> [ 4.111064][ T18] <TASK>
> [ 4.111064][ T18] dump_stack_lvl (lib/dump_stack.c:116)
> [ 4.111064][ T18] dump_stack (lib/dump_stack.c:124)
> [ 4.111064][ T18] check_preemption_disabled (arch/x86/include/asm/preempt.h:84 (discriminator 15) lib/smp_processor_id.c:53 (discriminator 15))
> [ 4.111064][ T18] debug_smp_processor_id (lib/smp_processor_id.c:61)
> [ 4.111064][ T18] rcu_rdp_is_offloaded (kernel/rcu/tree_plugin.h:27 (discriminator 1))
> [ 4.111064][ T18] nocb_cb_wait (kernel/rcu/tree_nocb.h:936 (discriminator 2))
> [ 4.111064][ T18] rcu_nocb_cb_kthread (kernel/rcu/tree_nocb.h:983 (discriminator 1))
> [ 4.111064][ T18] ? nocb_cb_wait (kernel/rcu/tree_nocb.h:976)
> [ 4.111064][ T18] kthread (kernel/kthread.c:388)
> [ 4.111064][ T18] ? kthread (kernel/kthread.c:373 (discriminator 2))
> [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> [ 4.111064][ T18] ret_from_fork (arch/x86/kernel/process.c:153)
> [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> [ 4.111064][ T18] ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
> [ 4.111064][ T18] </TASK>
>
> This commit therefore fixes this warning by checking the condition
> "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())" before invoking
> this_cpu_ptr(), thus avoiding preemptible invocations.
>
> Fixes: 8feeeba60711 ("rcu/nocb: Use kthread parking instead of ad-hoc implementation")
> Tested-by: kernel test robot <[email protected]>
> Signed-off-by: Zqiang <[email protected]>
> Signed-off-by: Paul E. McKenney <[email protected]>

Reviewed-by: Frederic Weisbecker <[email protected]>

2024-05-14 16:53:20

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH] rcu/nocb: Fix using smp_processor_id() in preemptible warning

On Tue, May 14, 2024 at 05:18:12PM +0200, Frederic Weisbecker wrote:
> Le Tue, May 14, 2024 at 07:54:40AM -0700, Paul E. McKenney a ?crit :
> > On Thu, May 09, 2024 at 03:40:46PM +0800, Zqiang wrote:
> > > Currently, the this_cpu_ptr(&rcu_data) in rcu_rdp_is_offloaded() is called
> > > before the condition "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())"
> > > is checked, and occurs in preemptible task context, this will trigger the
> > > following warning.
> > >
> > > [ 4.106221][ T18] BUG: using smp_processor_id() in preemptible [00000000] code: rcuop/0/18
> > > [ 4.107796][ T18] caller is debug_smp_processor_id (lib/smp_processor_id.c:61)
> > > [ 4.108547][ T18] CPU: 0 PID: 18 Comm: rcuop/0 Not tainted 6.9.0-rc2-00079-g4c66bc7cacc0 #1
> > > [ 4.109667][ T18] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> > > [ 4.111064][ T18] Call Trace:
> > > [ 4.111064][ T18] <TASK>
> > > [ 4.111064][ T18] dump_stack_lvl (lib/dump_stack.c:116)
> > > [ 4.111064][ T18] dump_stack (lib/dump_stack.c:124)
> > > [ 4.111064][ T18] check_preemption_disabled (arch/x86/include/asm/preempt.h:84 (discriminator 15) lib/smp_processor_id.c:53 (discriminator 15))
> > > [ 4.111064][ T18] debug_smp_processor_id (lib/smp_processor_id.c:61)
> > > [ 4.111064][ T18] rcu_rdp_is_offloaded (kernel/rcu/tree_plugin.h:27 (discriminator 1))
> > > [ 4.111064][ T18] nocb_cb_wait (kernel/rcu/tree_nocb.h:936 (discriminator 2))
> > > [ 4.111064][ T18] rcu_nocb_cb_kthread (kernel/rcu/tree_nocb.h:983 (discriminator 1))
> > > [ 4.111064][ T18] ? nocb_cb_wait (kernel/rcu/tree_nocb.h:976)
> > > [ 4.111064][ T18] kthread (kernel/kthread.c:388)
> > > [ 4.111064][ T18] ? kthread (kernel/kthread.c:373 (discriminator 2))
> > > [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> > > [ 4.111064][ T18] ret_from_fork (arch/x86/kernel/process.c:153)
> > > [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> > > [ 4.111064][ T18] ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
> > > [ 4.111064][ T18] </TASK>
> > >
> > > This commit fix this warning by priority check the condition
> > > "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())" , to
> > > ensure whether the this_cpu_ptr(&rcu_data) can be executed in
> > > rcu_rdp_is_offloaded().
> > >
> > > Fixes: 8feeeba60711 ("rcu/nocb: Use kthread parking instead of ad-hoc implementation")
> > > Tested-by: kernel test robot <[email protected]>
> > > Signed-off-by: Zqiang <[email protected]>
> >
> > Hearing no objections, I have queued this wordsmithed version. As always,
> > please let me know if I have messed anything up.
> >
> > Thanx, Paul
> >
> > ------------------------------------------------------------------------
> >
> > commit 5271ad1de0fbcf0bd9caebcf721670c164e5fa9c
> > Author: Zqiang <[email protected]>
> > Date: Thu May 9 15:40:46 2024 +0800
> >
> > rcu/nocb: Don't use smp_processor_id() in preemptible code
> >
> > Currently, rcu_rdp_is_offloaded() invokes this_cpu_ptr(&rcu_data) before
> > the condition "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())"
> > is checked. When invoked in preemptible context in preemptible kernels,
> > this will trigger the following warning:
> >
> > [ 4.106221][ T18] BUG: using smp_processor_id() in preemptible [00000000] code: rcuop/0/18
> > [ 4.107796][ T18] caller is debug_smp_processor_id (lib/smp_processor_id.c:61)
> > [ 4.108547][ T18] CPU: 0 PID: 18 Comm: rcuop/0 Not tainted 6.9.0-rc2-00079-g4c66bc7cacc0 #1
> > [ 4.109667][ T18] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> > [ 4.111064][ T18] Call Trace:
> > [ 4.111064][ T18] <TASK>
> > [ 4.111064][ T18] dump_stack_lvl (lib/dump_stack.c:116)
> > [ 4.111064][ T18] dump_stack (lib/dump_stack.c:124)
> > [ 4.111064][ T18] check_preemption_disabled (arch/x86/include/asm/preempt.h:84 (discriminator 15) lib/smp_processor_id.c:53 (discriminator 15))
> > [ 4.111064][ T18] debug_smp_processor_id (lib/smp_processor_id.c:61)
> > [ 4.111064][ T18] rcu_rdp_is_offloaded (kernel/rcu/tree_plugin.h:27 (discriminator 1))
> > [ 4.111064][ T18] nocb_cb_wait (kernel/rcu/tree_nocb.h:936 (discriminator 2))
> > [ 4.111064][ T18] rcu_nocb_cb_kthread (kernel/rcu/tree_nocb.h:983 (discriminator 1))
> > [ 4.111064][ T18] ? nocb_cb_wait (kernel/rcu/tree_nocb.h:976)
> > [ 4.111064][ T18] kthread (kernel/kthread.c:388)
> > [ 4.111064][ T18] ? kthread (kernel/kthread.c:373 (discriminator 2))
> > [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> > [ 4.111064][ T18] ret_from_fork (arch/x86/kernel/process.c:153)
> > [ 4.111064][ T18] ? kthread_complete_and_exit (kernel/kthread.c:341)
> > [ 4.111064][ T18] ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
> > [ 4.111064][ T18] </TASK>
> >
> > This commit therefore fixes this warning by checking the condition
> > "!(IS_ENABLED(CONFIG_PREEMPT_COUNT) && preemptible())" before invoking
> > this_cpu_ptr(), thus avoiding preemptible invocations.
> >
> > Fixes: 8feeeba60711 ("rcu/nocb: Use kthread parking instead of ad-hoc implementation")
> > Tested-by: kernel test robot <[email protected]>
> > Signed-off-by: Zqiang <[email protected]>
> > Signed-off-by: Paul E. McKenney <[email protected]>
>
> Reviewed-by: Frederic Weisbecker <[email protected]>

Applied, thank you!

Thanx, Paul