From: Arnd Bergmann <arnd@bergmann-dalldorf.de>
To: scott.feldman@intel.com
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [patch] e100 schedule while atomic
Date: Sat, 28 Sep 2002 22:53:14 +0200 [thread overview]
Message-ID: <200209282252.58796.arnd@bergmann-dalldorf.de> (raw)
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:
next reply other threads:[~2002-09-28 20:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-28 20:53 Arnd Bergmann [this message]
2002-09-30 21:48 Feldman, Scott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200209282252.58796.arnd@bergmann-dalldorf.de \
--to=arnd@bergmann-dalldorf.de \
--cc=linux-kernel@vger.kernel.org \
--cc=scott.feldman@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®