diff options
author | Ingo Molnar <mingo@kernel.org> | 2024-05-02 13:37:23 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-05-02 13:37:24 +0200 |
commit | c5cdb98d8d579efa8bf2c821063c0431eef71148 (patch) | |
tree | 2fba8cb38206654d4a963aa752522ec748c5382e | |
parent | 0106679839f7c69632b3b9833c3268c316c0a9fc (diff) | |
parent | 1dd1eff161bd55968d3d46bc36def62d71fb4785 (diff) | |
download | tip-c5cdb98d8d579efa8bf2c821063c0431eef71148.tar.gz |
Merge branch into tip/master: 'irq/urgent'
Notice: this object is not reachable from any branch.
# New commits in irq/urgent:
1dd1eff161bd ("softirq: Fix suspicious RCU usage in __do_softirq()")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Notice: this object is not reachable from any branch.
-rw-r--r-- | kernel/softirq.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index b315b21fb28cd2..02582017759a2c 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -508,7 +508,7 @@ static inline bool lockdep_softirq_start(void) { return false; } static inline void lockdep_softirq_end(bool in_hardirq) { } #endif -asmlinkage __visible void __softirq_entry __do_softirq(void) +static void handle_softirqs(bool ksirqd) { unsigned long end = jiffies + MAX_SOFTIRQ_TIME; unsigned long old_flags = current->flags; @@ -563,8 +563,7 @@ restart: pending >>= softirq_bit; } - if (!IS_ENABLED(CONFIG_PREEMPT_RT) && - __this_cpu_read(ksoftirqd) == current) + if (!IS_ENABLED(CONFIG_PREEMPT_RT) && ksirqd) rcu_softirq_qs(); local_irq_disable(); @@ -584,6 +583,11 @@ restart: current_restore_flags(old_flags, PF_MEMALLOC); } +asmlinkage __visible void __softirq_entry __do_softirq(void) +{ + handle_softirqs(false); +} + /** * irq_enter_rcu - Enter an interrupt context with RCU watching */ @@ -921,7 +925,7 @@ static void run_ksoftirqd(unsigned int cpu) * We can safely run softirq on inline stack, as we are not deep * in the task stack here. */ - __do_softirq(); + handle_softirqs(true); ksoftirqd_run_end(); cond_resched(); return; |