* RE: [patch] e100 schedule while atomic
@ 2002-09-30 21:48 Feldman, Scott
0 siblings, 0 replies; 2+ messages in thread
From: Feldman, Scott @ 2002-09-30 21:48 UTC (permalink / raw)
To: 'Arnd Bergmann'; +Cc: Linux Kernel
Arnd wrote:
> Running e100 on linux-2.5.39 showed that the driver
> incorrectly holds a lock while calling request_irq(), which
> does kmalloc().
>
> This patch appears to solve the problem. Not sure if it is
> correct, but something like it has to be done.
Thanks for pointing this out. I don't think the lock needs to be held at
all in e100_open, so we'll look into cleaning that up. Regardless, we'll
included a fix for this problem in our next set of patches to Jeff.
-scott
^ permalink raw reply [flat|nested] 2+ messages in thread
* [patch] e100 schedule while atomic
@ 2002-09-28 20:53 Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2002-09-28 20:53 UTC (permalink / raw)
To: scott.feldman; +Cc: Linux Kernel
Running e100 on linux-2.5.39 showed that the driver incorrectly
holds a lock while calling request_irq(), which does kmalloc().
This patch appears to solve the problem. Not sure if it is correct,
but something like it has to be done.
Arnd <><
===== drivers/net/e100/e100_main.c 1.25 vs edited =====
--- 1.25/drivers/net/e100/e100_main.c Fri Sep 20 01:58:59 2002
+++ edited/drivers/net/e100/e100_main.c Sat Sep 28 21:41:11 2002
@@ -986,11 +986,20 @@
netif_start_queue(dev);
e100_start_ru(bdp);
- if ((rc = request_irq(dev->irq, &e100intr, SA_SHIRQ,
- dev->name, dev)) != 0) {
- del_timer_sync(&bdp->watchdog_timer);
- goto err_exit;
+
+ read_unlock(&(bdp->isolate_lock));
+ rc = request_irq(dev->irq, &e100intr, SA_SHIRQ, dev->name, dev);
+ read_lock(&(bdp->isolate_lock));
+
+ if (rc != 0)
+ goto err_exit2;
+
+ if (bdp->driver_isolated) {
+ free_irq(dev->irq, dev);
+ rc = -EBUSY;
+ goto err_exit2;
}
+
if (bdp->params.b_params & PRM_RX_CONG) {
DECLARE_TASKLET(polling_tasklet,
e100_polling_tasklet, (unsigned long) bdp);
@@ -1003,6 +1012,8 @@
goto exit;
+err_exit2:
+ del_timer_sync(&bdp->watchdog_timer);
err_exit:
e100_clear_pools(bdp);
exit:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-30 21:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-30 21:48 [patch] e100 schedule while atomic Feldman, Scott
-- strict thread matches above, loose matches on Subject: below --
2002-09-28 20:53 Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).