Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234700
b: refs/heads/master
c: 1082687
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Feb 19, 2011
1 parent b97a691 commit a0658a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 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: 2b879eaf095878430c38cbd95e5c0fc4ce65ad8e
refs/heads/master: 1082687e8d6292a61759eb83358e7db39fed1bf4
12 changes: 9 additions & 3 deletions trunk/kernel/irq/spurious.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,13 @@ static void poll_spurious_irqs(unsigned long dummy)
*
* (The other 100-of-100,000 interrupts may have been a correctly
* functioning device sharing an IRQ with the failing one)
*
* Called under desc->lock
*/

static void
__report_bad_irq(unsigned int irq, struct irq_desc *desc,
irqreturn_t action_ret)
{
struct irqaction *action;
unsigned long flags;

if (action_ret != IRQ_HANDLED && action_ret != IRQ_NONE) {
printk(KERN_ERR "irq event %d: bogus return value %x\n",
Expand All @@ -159,6 +157,13 @@ __report_bad_irq(unsigned int irq, struct irq_desc *desc,
dump_stack();
printk(KERN_ERR "handlers:\n");

/*
* We need to take desc->lock here. note_interrupt() is called
* w/o desc->lock held, but IRQ_PROGRESS set. We might race
* with something else removing an action. It's ok to take
* desc->lock here. See synchronize_irq().
*/
raw_spin_lock_irqsave(&desc->lock, flags);
action = desc->action;
while (action) {
printk(KERN_ERR "[<%p>]", action->handler);
Expand All @@ -167,6 +172,7 @@ __report_bad_irq(unsigned int irq, struct irq_desc *desc,
printk("\n");
action = action->next;
}
raw_spin_unlock_irqrestore(&desc->lock, flags);
}

static void
Expand Down

0 comments on commit a0658a5

Please sign in to comment.