Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288596
b: refs/heads/master
c: 5234ffb
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Gordeev authored and Thomas Gleixner committed Mar 9, 2012
1 parent 52e4413 commit 758c520
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05d74efa3c72a5c40b0edeb15856c0230126313b
refs/heads/master: 5234ffb9f74cfa8993d174782bc861dd9b7b5bfb
4 changes: 2 additions & 2 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,8 +935,6 @@ void do_exit(long code)
schedule();
}

exit_irq_thread();

exit_signals(tsk); /* sets PF_EXITING */
/*
* tsk->flags are checked in the futex code to protect against
Expand All @@ -945,6 +943,8 @@ void do_exit(long code)
smp_mb();
raw_spin_unlock_wait(&tsk->pi_lock);

exit_irq_thread();

if (unlikely(in_atomic()))
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
current->comm, task_pid_nr(current),
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/irq/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static void irq_wake_thread(struct irq_desc *desc, struct irqaction *action)
* device interrupt, so no irq storm is lurking. If the
* RUNTHREAD bit is already set, nothing to do.
*/
if (test_bit(IRQTF_DIED, &action->thread_flags) ||
if ((action->thread->flags & PF_EXITING) ||
test_and_set_bit(IRQTF_RUNTHREAD, &action->thread_flags))
return;

Expand Down
2 changes: 0 additions & 2 deletions trunk/kernel/irq/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ extern bool noirqdebug;
/*
* Bits used by threaded handlers:
* IRQTF_RUNTHREAD - signals that the interrupt handler thread should run
* IRQTF_DIED - handler thread died
* IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed
* IRQTF_AFFINITY - irq thread is requested to adjust affinity
* IRQTF_FORCED_THREAD - irq action is force threaded
*/
enum {
IRQTF_RUNTHREAD,
IRQTF_DIED,
IRQTF_WARNED,
IRQTF_AFFINITY,
IRQTF_FORCED_THREAD,
Expand Down
11 changes: 1 addition & 10 deletions trunk/kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,17 +845,8 @@ void exit_irq_thread(void)

desc = irq_to_desc(action->irq);

/*
* Prevent a stale desc->threads_oneshot. Must be called
* before setting the IRQTF_DIED flag.
*/
/* Prevent a stale desc->threads_oneshot */
irq_finalize_oneshot(desc, action, true);

/*
* Set the THREAD DIED flag to prevent further wakeups of the
* soon to be gone threaded handler.
*/
set_bit(IRQTF_DIED, &action->flags);
}

static void irq_setup_forced_threading(struct irqaction *new)
Expand Down

0 comments on commit 758c520

Please sign in to comment.