netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Andrew Morton <akpm@osdl.com>, "David S. Miller" <davem@davemloft.net>
Cc: ak@suse.de, Jeff Moyer <jmoyer@redhat.com>,
	netdev@oss.sgi.com, linux-kernel@vger.kernel.org, mingo@elte.hu,
	john.ronciak@intel.com, rostedt@goodmis.org
Subject: [PATCH 2/8] netpoll: deadlock bugfix
Date: Thu, 11 Aug 2005 21:19:10 -0500	[thread overview]
Message-ID: <3.502409567@selenic.com> (raw)
In-Reply-To: <2.502409567@selenic.com>

This fixes an obvious deadlock in the netpoll code.  netpoll_rx takes the
npinfo->rx_lock.  netpoll_rx is also the only caller of arp_reply (through
__netpoll_rx).  As such, it is not necessary to take this lock.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>

Index: l/net/core/netpoll.c
===================================================================
--- l.orig/net/core/netpoll.c	2005-08-06 17:47:48.000000000 -0500
+++ l/net/core/netpoll.c	2005-08-06 17:47:49.000000000 -0500
@@ -353,11 +353,8 @@ static void arp_reply(struct sk_buff *sk
 	struct sk_buff *send_skb;
 	struct netpoll *np = NULL;
 
-	spin_lock_irqsave(&npinfo->rx_lock, flags);
 	if (npinfo->rx_np && npinfo->rx_np->dev == skb->dev)
 		np = npinfo->rx_np;
-	spin_unlock_irqrestore(&npinfo->rx_lock, flags);
-
 	if (!np)
 		return;
 

  reply	other threads:[~2005-08-12  2:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12  2:18 [PATCH 0/8] netpoll: various bugfixes Matt Mackall
2005-08-12  2:19 ` [PATCH 1/8] netpoll: rx_flags bugfix Matt Mackall
2005-08-12  2:19   ` Matt Mackall [this message]
2005-08-12  2:19     ` [PATCH 3/8] netpoll: e1000 netpoll tweak Matt Mackall
2005-08-12  2:19       ` [PATCH 4/8] netpoll: netpoll_send_skb simplify Matt Mackall
2005-08-12  2:19         ` [PATCH 5/8] netpoll: add retry timeout Matt Mackall
2005-08-12  2:19           ` [PATCH 6/8] netpoll: pre-fill skb pool Matt Mackall
2005-08-12  2:19             ` [PATCH 7/8] netpoll: fix initialization/NAPI race Matt Mackall
2005-08-12  2:19               ` [PATCH 8/8] netpoll: remove unused variable Matt Mackall
2005-08-12 19:02       ` [PATCH 3/8] netpoll: e1000 netpoll tweak John Ronciak
     [not found]       ` <56a8daef0508121202172bcd17@mail.gmail.com>
2005-08-12 19:10         ` David S. Miller
2005-08-12 19:17         ` Matt Mackall
2005-08-12  2:41 ` [PATCH 0/8] netpoll: various bugfixes David S. Miller
2005-08-12 17:21 ` Olaf Hering
     [not found] ` <20050812172151.GA11104@suse.de>
2005-08-12 19:21   ` Matt Mackall
2005-08-12 19:31     ` Olaf Hering
     [not found]     ` <20050812193109.GA15434@suse.de>
2005-08-14 21:00       ` Matt Mackall
2005-08-15  6:16         ` Olaf Hering

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=3.502409567@selenic.com \
    --to=mpm@selenic.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.com \
    --cc=davem@davemloft.net \
    --cc=jmoyer@redhat.com \
    --cc=john.ronciak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@oss.sgi.com \
    --cc=rostedt@goodmis.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).