diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-04 12:02:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-04 12:02:35 -0400 |
commit | 7f467cbff66a9f96dc7b1ee619a3fa54a80d0c79 (patch) | |
tree | 43374fe54a9e39df4df9cac57b335bafb2e32ab4 | |
parent | 6d15ee492809d38bd62237b6d0f6a81d4dd12d15 (diff) | |
parent | 0d119fb57614fe947aa9048f61d680bbede64170 (diff) |
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fix from Ingo Molnar:
"Frederic's minimal fix for hardirq/softirq nesting crashes"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irq: Force hardirq exit's softirq processing on its own stack
-rw-r--r-- | kernel/softirq.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index 53cc09ceb0b8..d7d498d8cc4f 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -328,10 +328,19 @@ void irq_enter(void) | |||
328 | 328 | ||
329 | static inline void invoke_softirq(void) | 329 | static inline void invoke_softirq(void) |
330 | { | 330 | { |
331 | if (!force_irqthreads) | 331 | if (!force_irqthreads) { |
332 | __do_softirq(); | 332 | /* |
333 | else | 333 | * We can safely execute softirq on the current stack if |
334 | * it is the irq stack, because it should be near empty | ||
335 | * at this stage. But we have no way to know if the arch | ||
336 | * calls irq_exit() on the irq stack. So call softirq | ||
337 | * in its own stack to prevent from any overrun on top | ||
338 | * of a potentially deep task stack. | ||
339 | */ | ||
340 | do_softirq(); | ||
341 | } else { | ||
334 | wakeup_softirqd(); | 342 | wakeup_softirqd(); |
343 | } | ||
335 | } | 344 | } |
336 | 345 | ||
337 | static inline void tick_irq_exit(void) | 346 | static inline void tick_irq_exit(void) |