Skip to content

Commit

Permalink
m68knommu: fix fec driver interrupt races
Browse files Browse the repository at this point in the history
The FEC driver has a common interrupt handler for all interrupt event
types. It is raised on a number of distinct interrupt vectors.
This handler can't be re-entered while processing an interrupt, so
make sure all requested vectors are flagged as IRQF_DISABLED.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Greg Ungerer authored and Linus Torvalds committed Mar 4, 2008
1 parent e311f68 commit 0a50477
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)

/* Setup interrupt handlers. */
for (idp = id; idp->name; idp++) {
if (request_irq(idp->irq, idp->handler, 0, idp->name, dev) != 0)
if (request_irq(idp->irq, idp->handler, IRQF_DISABLED, idp->name, dev) != 0)
printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, idp->irq);
}

Expand Down Expand Up @@ -1382,7 +1382,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)

/* Setup interrupt handlers. */
for (idp = id; idp->name; idp++) {
if (request_irq(b+idp->irq, fec_enet_interrupt, 0, idp->name, dev) != 0)
if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name, dev) != 0)
printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq);
}

Expand Down Expand Up @@ -1553,7 +1553,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)

/* Setup interrupt handlers. */
for (idp = id; idp->name; idp++) {
if (request_irq(b+idp->irq,fec_enet_interrupt,0,idp->name,dev)!=0)
if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name,dev) != 0)
printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq);
}

Expand Down Expand Up @@ -1680,7 +1680,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)

/* Setup interrupt handlers. */
for (idp = id; idp->name; idp++) {
if (request_irq(b+idp->irq,fec_enet_interrupt,0,idp->name,dev)!=0)
if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name,dev) != 0)
printk("FEC: Could not allocate %s IRQ(%d)!\n",
idp->name, b+idp->irq);
}
Expand Down

0 comments on commit 0a50477

Please sign in to comment.