netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Jeff Garzik <jeff@garzik.org>, David Miller <davem@davemloft.net>
Cc: Bernard Pidoux F6BVP <f6bvp@free.fr>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: [PATCH] lib8390: Fix locking in ei_poll (poll controller)
Date: Wed, 1 Oct 2008 06:58:25 +0000	[thread overview]
Message-ID: <20081001065824.GA11235@ff.dom.local> (raw)
In-Reply-To: <20080930101030.GA6290@ff.dom.local>


lib8390: Fix locking in ei_poll (poll controller)

This lockdep warning:
  =================================
  [ INFO: inconsistent lock state ]
  2.6.27-rc7 #3
  ---------------------------------
  inconsistent {in-softirq-W} -> {softirq-on-W} usage.
  syslogd/2474 [HC0[0]:SC0[0]:HE1:SE1] takes:
   (_xmit_ETHER#2){-+..}, at: [<c0265562>] netpoll_send_skb+0x132/0x190
  ...

is caused by unconditional local_irq_disable()/local_irq_enable() in
disable_irq_lockdep()/enable_irq_lockdep() used by __ei_poll(). Since
netconsole/netpoll always calls dev->poll_controller() with local irqs
disabled, disable_irq()/enable_irq() instead is safe and enough (like
e.g. in 3c509 or 8139xx drivers).

Reported-and-tested-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>

---

 drivers/net/lib8390.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index 00d59ab..f80dcc1 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -530,9 +530,9 @@ static irqreturn_t __ei_interrupt(int irq, void *dev_id)
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void __ei_poll(struct net_device *dev)
 {
-	disable_irq_lockdep(dev->irq);
+	disable_irq(dev->irq);
 	__ei_interrupt(dev->irq, dev);
-	enable_irq_lockdep(dev->irq);
+	enable_irq(dev->irq);
 }
 #endif
 

      parent reply	other threads:[~2008-10-01  6:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-28 12:49 kernel panic linux-2.6.27-rc7 Bernard Pidoux F6BVP
2008-09-29 12:30 ` ax25 rose " Jarek Poplawski
2008-09-30  9:40   ` Bernard Pidoux F6BVP
2008-09-30 10:10     ` Jarek Poplawski
2008-09-30 11:17       ` Jarek Poplawski
2008-09-30 20:59         ` Bernard Pidoux F6BVP
2008-09-30 21:30           ` Jarek Poplawski
2008-09-30 22:49             ` Bernard Pidoux F6BVP
2008-10-01  5:58               ` Jarek Poplawski
2008-10-02 18:20                 ` Bernard, f6bvp
2008-10-02 19:48                   ` Jarek Poplawski
2008-10-03  7:34                     ` Jarek Poplawski
2008-10-03  7:43                       ` Jarek Poplawski
2008-10-04 18:30                         ` Bernard, f6bvp
2008-10-04 19:11                           ` Jarek Poplawski
2008-10-04 20:09                             ` Jarek Poplawski
2008-10-05 15:40                               ` Bernard, f6bvp
2008-10-05 20:33                                 ` Jarek Poplawski
2008-10-05 21:09                                   ` Jarek Poplawski
2008-10-05 18:31                               ` Bernard, f6bvp
2008-10-05 20:40                                 ` Jarek Poplawski
2008-10-05 21:18                                   ` Bernard, f6bvp
2008-10-05 22:05                                     ` [PATCH to REVERT] " Jarek Poplawski
2008-10-06 20:05                                       ` David Miller
2008-10-05 22:16                                     ` [PATCH] netrom: Fix sock_orphan() use in nr_release Jarek Poplawski
2008-10-05 13:04                           ` ax25 rose Re: kernel panic linux-2.6.27-rc7 Jarek Poplawski
2008-10-01  6:58       ` Jarek Poplawski [this message]

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=20081001065824.GA11235@ff.dom.local \
    --to=jarkao2@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f6bvp@free.fr \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).