summaryrefslogtreecommitdiff
path: root/patches/kernel-softirq-unlock-with-irqs-on.patch
blob: 8ad12c5a8a9888f6b967c209fb9a8e9c592f2ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 9 Feb 2016 18:17:18 +0100
Subject: kernel: softirq: unlock with irqs on

We unlock the lock while the interrupts are off. This isn't a problem
now but will get because the migrate_disable() + enable are not
symmetrical in regard to the status of interrupts.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/softirq.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -560,8 +560,10 @@ static void do_current_softirqs(void)
 			do_single_softirq(i);
 		}
 		softirq_clr_runner(i);
-		unlock_softirq(i);
 		WARN_ON(current->softirq_nestcnt != 1);
+		local_irq_enable();
+		unlock_softirq(i);
+		local_irq_disable();
 	}
 }