diff options
Diffstat (limited to 'debian/patches-rt/rcu-Acquire-RCU-lock-when-disabling-BHs.patch')
-rw-r--r-- | debian/patches-rt/rcu-Acquire-RCU-lock-when-disabling-BHs.patch | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/debian/patches-rt/rcu-Acquire-RCU-lock-when-disabling-BHs.patch b/debian/patches-rt/rcu-Acquire-RCU-lock-when-disabling-BHs.patch deleted file mode 100644 index 299994796..000000000 --- a/debian/patches-rt/rcu-Acquire-RCU-lock-when-disabling-BHs.patch +++ /dev/null @@ -1,57 +0,0 @@ -From: Scott Wood <swood@redhat.com> -Date: Wed, 11 Sep 2019 17:57:25 +0100 -Subject: [PATCH] rcu: Acquire RCU lock when disabling BHs -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz - -A plain local_bh_disable() is documented as creating an RCU critical -section, and (at least) rcutorture expects this to be the case. However, -in_softirq() doesn't block a grace period on PREEMPT_RT, since RCU checks -preempt_count() directly. Even if RCU were changed to check -in_softirq(), that wouldn't allow blocked BH disablers to be boosted. - -Fix this by calling rcu_read_lock() from local_bh_disable(). - -Signed-off-by: Scott Wood <swood@redhat.com> -Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - kernel/softirq.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - ---- a/kernel/softirq.c -+++ b/kernel/softirq.c -@@ -115,8 +115,10 @@ void __local_bh_disable_ip(unsigned long - long soft_cnt; - - WARN_ON_ONCE(in_irq()); -- if (!in_atomic()) -+ if (!in_atomic()) { - local_lock(bh_lock); -+ rcu_read_lock(); -+ } - soft_cnt = this_cpu_inc_return(softirq_counter); - WARN_ON_ONCE(soft_cnt == 0); - current->softirq_count += SOFTIRQ_DISABLE_OFFSET; -@@ -151,8 +153,10 @@ void _local_bh_enable(void) - #endif - - current->softirq_count -= SOFTIRQ_DISABLE_OFFSET; -- if (!in_atomic()) -+ if (!in_atomic()) { -+ rcu_read_unlock(); - local_unlock(bh_lock); -+ } - } - - void _local_bh_enable_rt(void) -@@ -185,8 +189,10 @@ void __local_bh_enable_ip(unsigned long - WARN_ON_ONCE(count < 0); - local_irq_enable(); - -- if (!in_atomic()) -+ if (!in_atomic()) { -+ rcu_read_unlock(); - local_unlock(bh_lock); -+ } - - current->softirq_count -= SOFTIRQ_DISABLE_OFFSET; - preempt_check_resched(); |