Patch "rcu/srcutiny: don't return before reenabling preemption" has been added to the 6.11-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/srcutiny: don't return before reenabling preemption

to the 6.11-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-srcutiny-don-t-return-before-reenabling-preempti.patch
and it can be found in the queue-6.11 subdirectory.

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



commit eecf7c59113308da0055bbaaecd736e36f130065
Author: Michal Schmidt <mschmidt@xxxxxxxxxx>
Date:   Mon Oct 7 12:14:15 2024 +0200

    rcu/srcutiny: don't return before reenabling preemption
    
    [ Upstream commit 0ea3acbc804c2d5a165442cdf9c0526f4d324888 ]
    
    Code after the return statement is dead. Enable preemption before
    returning from srcu_drive_gp().
    
    This will be important when/if PREEMPT_AUTO (lazy resched) gets merged.
    
    Fixes: 65b4a59557f6 ("srcu: Make Tiny SRCU explicitly disable preemption")
    Reviewed-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Signed-off-by: Michal Schmidt <mschmidt@xxxxxxxxxx>
    Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@xxxxxxx>
    Signed-off-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c
index 549c03336ee97..4dcbf8aa80ff7 100644
--- a/kernel/rcu/srcutiny.c
+++ b/kernel/rcu/srcutiny.c
@@ -122,8 +122,8 @@ void srcu_drive_gp(struct work_struct *wp)
 	ssp = container_of(wp, struct srcu_struct, srcu_work);
 	preempt_disable();  // Needed for PREEMPT_AUTO
 	if (ssp->srcu_gp_running || ULONG_CMP_GE(ssp->srcu_idx, READ_ONCE(ssp->srcu_idx_max))) {
-		return; /* Already running or nothing to do. */
 		preempt_enable();
+		return; /* Already running or nothing to do. */
 	}
 
 	/* Remove recently arrived callbacks and wait for readers. */




[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