Patch "rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE()" has been added to the 5.15-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-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE()

to the 5.15-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-tasks-convert-rcu_lockdep_warn-to-warn_once.patch
and it can be found in the queue-5.15 subdirectory.

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



commit e7f9fad5c008f2b361b2db2a1489818d3f6e15e8
Author: Zqiang <qiang1.zhang@xxxxxxxxx>
Date:   Tue Jul 12 16:26:05 2022 +0800

    rcu-tasks: Convert RCU_LOCKDEP_WARN() to WARN_ONCE()
    
    [ Upstream commit fcd53c8a4dfa38bafb89efdd0b0f718f3a03f884 ]
    
    Kernels built with CONFIG_PROVE_RCU=y and CONFIG_DEBUG_LOCK_ALLOC=y
    attempt to emit a warning when the synchronize_rcu_tasks_generic()
    function is called during early boot while the rcu_scheduler_active
    variable is RCU_SCHEDULER_INACTIVE.  However the warnings is not
    actually be printed because the debug_lockdep_rcu_enabled() returns
    false, exactly because the rcu_scheduler_active variable is still equal
    to RCU_SCHEDULER_INACTIVE.
    
    This commit therefore replaces RCU_LOCKDEP_WARN() with WARN_ONCE()
    to force these warnings to actually be printed.
    
    Signed-off-by: Zqiang <qiang1.zhang@xxxxxxxxx>
    Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index 60c9eacac25b..ae8396032b5d 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -171,7 +171,7 @@ static void call_rcu_tasks_generic(struct rcu_head *rhp, rcu_callback_t func,
 static void synchronize_rcu_tasks_generic(struct rcu_tasks *rtp)
 {
 	/* Complain if the scheduler has not started.  */
-	RCU_LOCKDEP_WARN(rcu_scheduler_active == RCU_SCHEDULER_INACTIVE,
+	WARN_ONCE(rcu_scheduler_active == RCU_SCHEDULER_INACTIVE,
 			 "synchronize_rcu_tasks called too soon");
 
 	/* Wait for the grace period. */



[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