mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: mpm@selenic.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [rfc | patch 6/6] netpoll: fix deadlock in arp_reply
Date: Fri, 1 Jul 2005 19:10:20 -0400	[thread overview]
Message-ID: <17093.52572.3153.664456@segfault.boston.redhat.com> (raw)
In-Reply-To: <17093.52306.136742.190912@segfault.boston.redhat.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>

--- linux-2.6.12/net/core/netpoll.c.orig	2005-07-01 17:55:24.313339068 -0400
+++ linux-2.6.12/net/core/netpoll.c	2005-07-01 17:55:57.354863472 -0400
@@ -370,11 +370,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;
 

  parent reply	other threads:[~2005-07-01 23:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-01 23:05 [rfc | patch 0/6] netpoll: add support for the bonding driver Jeff Moyer
2005-07-01 23:06 ` Jeff Moyer
2005-07-01 23:06 ` Jeff Moyer
2005-07-01 23:08 ` [rfc | patch 3/6] netpoll: change poll_napi to take a net_device Jeff Moyer
2005-07-01 23:08 ` [rfc | patch 4/6] netpoll: add netpoll hooks to support the bonding driver Jeff Moyer
2005-07-01 23:09 ` [rfc | patch 5/6] netpoll: modify bonding driver to support netpoll Jeff Moyer
2005-07-01 23:10 ` Jeff Moyer [this message]
2005-07-01 23:38 ` [rfc | patch 0/6] netpoll: add support for the bonding driver Matt Mackall
2005-07-01 23:43   ` Jeff Moyer

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=17093.52572.3153.664456@segfault.boston.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --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

all inboxes | Powered by JetHome®