Patch "rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment" has been added to the 5.4-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

    rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment

to the 5.4-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:
     rcutorture-fix-rcu_torture_one_read-pipe_count-overf.patch
and it can be found in the queue-5.4 subdirectory.

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



commit ade333e100aec394f067fa0d52c658c4eff29b73
Author: Paul E. McKenney <paulmck@xxxxxxxxxx>
Date:   Wed Mar 6 19:21:47 2024 -0800

    rcutorture: Fix rcu_torture_one_read() pipe_count overflow comment
    
    [ Upstream commit 8b9b443fa860276822b25057cb3ff3b28734dec0 ]
    
    The "pipe_count > RCU_TORTURE_PIPE_LEN" check has a comment saying "Should
    not happen, but...".  This is only true when testing an RCU whose grace
    periods are always long enough.  This commit therefore fixes this comment.
    
    Reported-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Closes: https://lore.kernel.org/lkml/CAHk-=wi7rJ-eGq+xaxVfzFEgbL9tdf6Kc8Z89rCpfcQOKm74Tw@xxxxxxxxxxxxxx/
    Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Signed-off-by: Uladzislau Rezki (Sony) <urezki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 3c9feca1eab17..aef4d01c4f61e 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1291,7 +1291,8 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp)
 	preempt_disable();
 	pipe_count = p->rtort_pipe_count;
 	if (pipe_count > RCU_TORTURE_PIPE_LEN) {
-		/* Should not happen, but... */
+		// Should not happen in a correct RCU implementation,
+		// happens quite often for torture_type=busted.
 		pipe_count = RCU_TORTURE_PIPE_LEN;
 	}
 	completed = cur_ops->get_gp_seq();




[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