summaryrefslogtreecommitdiff
path: root/kernel/rcu
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2024-10-07 12:14:15 +0200
committerFrederic Weisbecker <frederic@kernel.org>2024-11-12 21:45:20 +0100
commit0ea3acbc804c2d5a165442cdf9c0526f4d324888 (patch)
tree89d8d15137b7a84756dca4e109e2c0e150b6fb7c /kernel/rcu
parentd4e287d7caff971c859ee6db65add42bde1d86ec (diff)
downloadlwn-0ea3acbc804c2d5a165442cdf9c0526f4d324888.tar.gz
lwn-0ea3acbc804c2d5a165442cdf9c0526f4d324888.zip
rcu/srcutiny: don't return before reenabling preemption
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@kernel.org> Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/srcutiny.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c
index 549c03336ee9..4dcbf8aa80ff 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. */