Skip to content

Commit

Permalink
mmc: wbsd: initialize tasklets before requesting interrupt
Browse files Browse the repository at this point in the history
With CONFIG_DEBUG_SHIRQ set we will get an interrupt as soon as we
allocate one.  Tasklets may be scheduled in the interrupt handler but they
will be initialized after the handler returns, causing a BUG() in
kernel/softirq.c when they run.

Should fix this Fedora bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=449817

Signed-off-by: Chuck Ebbert <[email protected]>
Acked-by: Pierre Ossman <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Chuck Ebbert authored and torvalds committed Jun 13, 2008
1 parent 30ec261 commit cef3340
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions drivers/mmc/host/wbsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,17 +1457,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
int ret;

/*
* Allocate interrupt.
*/

ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host);
if (ret)
return ret;

host->irq = irq;

/*
* Set up tasklets.
* Set up tasklets. Must be done before requesting interrupt.
*/
tasklet_init(&host->card_tasklet, wbsd_tasklet_card,
(unsigned long)host);
Expand All @@ -1480,6 +1470,15 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish,
(unsigned long)host);

/*
* Allocate interrupt.
*/
ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host);
if (ret)
return ret;

host->irq = irq;

return 0;
}

Expand Down

0 comments on commit cef3340

Please sign in to comment.