Patch "rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait()" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait()

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rcu-suppress-smp_processor_id-complaint-in-synchroni.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e4d10627a8f674cab4e8084937374e5d41574464
Author: Paul E. McKenney <paulmck@xxxxxxxxxx>
Date:   Fri Dec 16 15:55:48 2022 -0800

    rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait()
    
    [ Upstream commit 2d7f00b2f01301d6e41fd4a28030dab0442265be ]
    
    The normal grace period's RCU CPU stall warnings are invoked from the
    scheduling-clock interrupt handler, and can thus invoke smp_processor_id()
    with impunity, which allows them to directly invoke dump_cpu_task().
    In contrast, the expedited grace period's RCU CPU stall warnings are
    invoked from process context, which causes the dump_cpu_task() function's
    calls to smp_processor_id() to complain bitterly in debug kernels.
    
    This commit therefore causes synchronize_rcu_expedited_wait() to disable
    preemption around its call to dump_cpu_task().
    
    Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index f90d10c1c3c8d..843399e98bb37 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -498,7 +498,9 @@ static void synchronize_sched_expedited_wait(struct rcu_state *rsp)
 				mask = leaf_node_cpu_bit(rnp, cpu);
 				if (!(rnp->expmask & mask))
 					continue;
+				preempt_disable(); // For smp_processor_id() in dump_cpu_task().
 				dump_cpu_task(cpu);
+				preempt_enable();
 			}
 		}
 		jiffies_stall = 3 * rcu_jiffies_till_stall_check() + 3;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux