Patch "s390/smp: move rcu_cpu_starting() earlier" has been added to the 4.19-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

    s390/smp: move rcu_cpu_starting() earlier

to the 4.19-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:
     s390-smp-move-rcu_cpu_starting-earlier.patch
and it can be found in the queue-4.19 subdirectory.

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



commit e66086ba2887d779c7b0ecde1de2b10e4956c94d
Author: Qian Cai <cai@xxxxxxxxxx>
Date:   Wed Oct 28 14:27:42 2020 -0400

    s390/smp: move rcu_cpu_starting() earlier
    
    [ Upstream commit de5d9dae150ca1c1b5c7676711a9ca139d1a8dec ]
    
    The call to rcu_cpu_starting() in smp_init_secondary() is not early
    enough in the CPU-hotplug onlining process, which results in lockdep
    splats as follows:
    
     WARNING: suspicious RCU usage
     -----------------------------
     kernel/locking/lockdep.c:3497 RCU-list traversed in non-reader section!!
    
     other info that might help us debug this:
    
     RCU used illegally from offline CPU!
     rcu_scheduler_active = 1, debug_locks = 1
     no locks held by swapper/1/0.
    
     Call Trace:
     show_stack+0x158/0x1f0
     dump_stack+0x1f2/0x238
     __lock_acquire+0x2640/0x4dd0
     lock_acquire+0x3a8/0xd08
     _raw_spin_lock_irqsave+0xc0/0xf0
     clockevents_register_device+0xa8/0x528
     init_cpu_timer+0x33e/0x468
     smp_init_secondary+0x11a/0x328
     smp_start_secondary+0x82/0x88
    
    This is avoided by moving the call to rcu_cpu_starting up near the
    beginning of the smp_init_secondary() function. Note that the
    raw_smp_processor_id() is required in order to avoid calling into
    lockdep before RCU has declared the CPU to be watched for readers.
    
    Link: https://lore.kernel.org/lkml/160223032121.7002.1269740091547117869.tip-bot2@tip-bot2/
    Signed-off-by: Qian Cai <cai@xxxxxxxxxx>
    Acked-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 8e31dfd85de32..888f247c9261a 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -831,7 +831,7 @@ void __init smp_detect_cpus(void)
  */
 static void smp_start_secondary(void *cpuvoid)
 {
-	int cpu = smp_processor_id();
+	int cpu = raw_smp_processor_id();
 
 	S390_lowcore.last_update_clock = get_tod_clock();
 	S390_lowcore.restart_stack = (unsigned long) restart_stack;
@@ -844,6 +844,7 @@ static void smp_start_secondary(void *cpuvoid)
 	set_cpu_flag(CIF_ASCE_PRIMARY);
 	set_cpu_flag(CIF_ASCE_SECONDARY);
 	cpu_init();
+	rcu_cpu_starting(cpu);
 	preempt_disable();
 	init_cpu_timer();
 	vtime_init();



[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