summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-task.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
commit08b74a000942a380fe028845f92cd3a0dee827d5 (patch)
treeaa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/patches-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-task.patch
parentAdding upstream version 4.19.249. (diff)
downloadlinux-08b74a000942a380fe028845f92cd3a0dee827d5.tar.xz
linux-08b74a000942a380fe028845f92cd3a0dee827d5.zip
Adding debian version 4.19.249-2.debian/4.19.249-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-task.patch')
-rw-r--r--debian/patches-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-task.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/debian/patches-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-task.patch b/debian/patches-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-task.patch
new file mode 100644
index 000000000..965311d51
--- /dev/null
+++ b/debian/patches-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-task.patch
@@ -0,0 +1,41 @@
+From 7879ba227dbde103356be2bef58a9733a930c0a0 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Tue, 19 Feb 2019 16:49:29 +0100
+Subject: [PATCH 126/347] softirq: Avoid "local_softirq_pending" messages if
+ task is in cpu_chill()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz
+
+If the softirq thread enters cpu_chill() then ->state is UNINTERRUPTIBLE
+and has no ->pi_blocked_on set and so its mask is not taken into account.
+
+->sleeping_lock is increased by cpu_chill() since it is also requried to
+avoid a splat by RCU in case cpu_chill() is used while a RCU-read lock
+is held. Use the same mechanism for the softirq-pending check.
+
+Cc: stable-rt@vger.kernel.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ kernel/softirq.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index 1920985eeb09..27a4bb2303d0 100644
+--- a/kernel/softirq.c
++++ b/kernel/softirq.c
+@@ -105,9 +105,12 @@ static bool softirq_check_runner_tsk(struct task_struct *tsk,
+ * _before_ it sets pi_blocked_on to NULL under
+ * tsk->pi_lock. So we need to check for both: state
+ * and pi_blocked_on.
++ * The test against UNINTERRUPTIBLE + ->sleeping_lock is in case the
++ * task does cpu_chill().
+ */
+ raw_spin_lock(&tsk->pi_lock);
+- if (tsk->pi_blocked_on || tsk->state == TASK_RUNNING) {
++ if (tsk->pi_blocked_on || tsk->state == TASK_RUNNING ||
++ (tsk->state == TASK_UNINTERRUPTIBLE && tsk->sleeping_lock)) {
+ /* Clear all bits pending in that task */
+ *pending &= ~(tsk->softirqs_raised);
+ ret = true;
+--
+2.36.1
+