Patch "rcu: Eliminate rcu_gp_slow_unregister() false positive" has been added to the 6.6-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: Eliminate rcu_gp_slow_unregister() false positive

to the 6.6-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-eliminate-rcu_gp_slow_unregister-false-positive.patch
and it can be found in the queue-6.6 subdirectory.

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



commit a378c239de5df79169fbe1ddbd4e38d21eb9f543
Author: Paul E. McKenney <paulmck@xxxxxxxxxx>
Date:   Fri Aug 18 08:53:58 2023 -0700

    rcu: Eliminate rcu_gp_slow_unregister() false positive
    
    [ Upstream commit 0ae9942f03d0d034fdb0a4f44fc99f62a3107987 ]
    
    When using rcutorture as a module, there are a number of conditions that
    can abort the modprobe operation, for example, when attempting to run
    both RCU CPU stall warning tests and forward-progress tests.  This can
    cause rcu_torture_cleanup() to be invoked on the unwind path out of
    rcu_rcu_torture_init(), which will mean that rcu_gp_slow_unregister()
    is invoked without a matching rcu_gp_slow_register().  This will cause
    a splat because rcu_gp_slow_unregister() is passed rcu_fwd_cb_nodelay,
    which does not match a NULL pointer.
    
    This commit therefore forgives a mismatch involving a NULL pointer, thus
    avoiding this false-positive splat.
    
    Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Signed-off-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index c7cb465e2e0c7..8541084eeba50 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1298,7 +1298,7 @@ EXPORT_SYMBOL_GPL(rcu_gp_slow_register);
 /* Unregister a counter, with NULL for not caring which. */
 void rcu_gp_slow_unregister(atomic_t *rgssp)
 {
-	WARN_ON_ONCE(rgssp && rgssp != rcu_gp_slow_suppress);
+	WARN_ON_ONCE(rgssp && rgssp != rcu_gp_slow_suppress && rcu_gp_slow_suppress != NULL);
 
 	WRITE_ONCE(rcu_gp_slow_suppress, NULL);
 }




[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