* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: slab, lockdep: Fix silly bug * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Fix race condition when stopping the irq thread
Showing the changes to kernel (1 of 2 files). Show all
Unified · Split
| @@ -623,8 +623,9 @@ static irqreturn_t irq_nested_primary_handler(int irq, void *dev_id) · 622 unmodified lines | ||
| 623 | 623 | |
| 624 | 624 | static int irq_wait_for_interrupt(struct irqaction *action) |
| 625 | 625 | { |
| 626 | + set_current_state(TASK_INTERRUPTIBLE); | |
| 627 | + | |
| 626 | 628 | while (!kthread_should_stop()) { |
| 627 | − set_current_state(TASK_INTERRUPTIBLE); | |
| 628 | 629 | |
| 629 | 630 | if (test_and_clear_bit(IRQTF_RUNTHREAD, |
| 630 | 631 | &action->thread_flags)) { |
| @@ -632,7 +633,9 @@ static int irq_wait_for_interrupt(struct irqaction *action) · 1 unmodified line | ||
| 632 | 633 | return 0; |
| 633 | 634 | } |
| 634 | 635 | schedule(); |
| 636 | + set_current_state(TASK_INTERRUPTIBLE); | |
| 635 | 637 | } |
| 638 | + __set_current_state(TASK_RUNNING); | |
| 636 | 639 | return -1; |
| 637 | 640 | } |
| 638 | 641 | |