diff options
-rw-r--r-- | kernel/exit.c | 4 | ||||
-rw-r--r-- | kernel/irq/handle.c | 2 | ||||
-rw-r--r-- | kernel/irq/internals.h | 2 | ||||
-rw-r--r-- | kernel/irq/manage.c | 11 |
4 files changed, 4 insertions, 15 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 4b4042f9bc6a..752d2c0abd19 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -935,8 +935,6 @@ void do_exit(long code) | |||
935 | schedule(); | 935 | schedule(); |
936 | } | 936 | } |
937 | 937 | ||
938 | exit_irq_thread(); | ||
939 | |||
940 | exit_signals(tsk); /* sets PF_EXITING */ | 938 | exit_signals(tsk); /* sets PF_EXITING */ |
941 | /* | 939 | /* |
942 | * tsk->flags are checked in the futex code to protect against | 940 | * tsk->flags are checked in the futex code to protect against |
@@ -945,6 +943,8 @@ void do_exit(long code) | |||
945 | smp_mb(); | 943 | smp_mb(); |
946 | raw_spin_unlock_wait(&tsk->pi_lock); | 944 | raw_spin_unlock_wait(&tsk->pi_lock); |
947 | 945 | ||
946 | exit_irq_thread(); | ||
947 | |||
948 | if (unlikely(in_atomic())) | 948 | if (unlikely(in_atomic())) |
949 | printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n", | 949 | printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n", |
950 | current->comm, task_pid_nr(current), | 950 | current->comm, task_pid_nr(current), |
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 470d08c82bbe..500aaf67c546 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -60,7 +60,7 @@ static void irq_wake_thread(struct irq_desc *desc, struct irqaction *action) | |||
60 | * device interrupt, so no irq storm is lurking. If the | 60 | * device interrupt, so no irq storm is lurking. If the |
61 | * RUNTHREAD bit is already set, nothing to do. | 61 | * RUNTHREAD bit is already set, nothing to do. |
62 | */ | 62 | */ |
63 | if (test_bit(IRQTF_DIED, &action->thread_flags) || | 63 | if ((action->thread->flags & PF_EXITING) || |
64 | test_and_set_bit(IRQTF_RUNTHREAD, &action->thread_flags)) | 64 | test_and_set_bit(IRQTF_RUNTHREAD, &action->thread_flags)) |
65 | return; | 65 | return; |
66 | 66 | ||
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index b7952316016a..5c233e0ea2c3 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
@@ -20,14 +20,12 @@ extern bool noirqdebug; | |||
20 | /* | 20 | /* |
21 | * Bits used by threaded handlers: | 21 | * Bits used by threaded handlers: |
22 | * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run | 22 | * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run |
23 | * IRQTF_DIED - handler thread died | ||
24 | * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed | 23 | * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed |
25 | * IRQTF_AFFINITY - irq thread is requested to adjust affinity | 24 | * IRQTF_AFFINITY - irq thread is requested to adjust affinity |
26 | * IRQTF_FORCED_THREAD - irq action is force threaded | 25 | * IRQTF_FORCED_THREAD - irq action is force threaded |
27 | */ | 26 | */ |
28 | enum { | 27 | enum { |
29 | IRQTF_RUNTHREAD, | 28 | IRQTF_RUNTHREAD, |
30 | IRQTF_DIED, | ||
31 | IRQTF_WARNED, | 29 | IRQTF_WARNED, |
32 | IRQTF_AFFINITY, | 30 | IRQTF_AFFINITY, |
33 | IRQTF_FORCED_THREAD, | 31 | IRQTF_FORCED_THREAD, |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 3feab4ab6877..a94466db73b2 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -845,17 +845,8 @@ void exit_irq_thread(void) | |||
845 | 845 | ||
846 | desc = irq_to_desc(action->irq); | 846 | desc = irq_to_desc(action->irq); |
847 | 847 | ||
848 | /* | 848 | /* Prevent a stale desc->threads_oneshot */ |
849 | * Prevent a stale desc->threads_oneshot. Must be called | ||
850 | * before setting the IRQTF_DIED flag. | ||
851 | */ | ||
852 | irq_finalize_oneshot(desc, action, true); | 849 | irq_finalize_oneshot(desc, action, true); |
853 | |||
854 | /* | ||
855 | * Set the THREAD DIED flag to prevent further wakeups of the | ||
856 | * soon to be gone threaded handler. | ||
857 | */ | ||
858 | set_bit(IRQTF_DIED, &action->flags); | ||
859 | } | 850 | } |
860 | 851 | ||
861 | static void irq_setup_forced_threading(struct irqaction *new) | 852 | static void irq_setup_forced_threading(struct irqaction *new) |