lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 4 Apr 2007 15:26:35 -0700
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	Dave Jones <davej@...hat.com>
Cc:	netdev@...r.kernel.org
Subject: [RFT] proxy arp deadlock possible

Thanks Dave, there is a classic AB BA deadlock here.
We should break the dependency like this.

Could someone who uses proxy ARP test this?
-----

Need to drop one of the locks to avoid deadlock between
proxy arp and incoming arp receive.
---
 net/core/neighbour.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index cfc6001..d6b3a62 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1212,6 +1212,7 @@ static void neigh_proxy_process(unsigned
 	unsigned long now = jiffies;
 	struct sk_buff *skb;
 
+rescan:
 	spin_lock(&tbl->proxy_queue.lock);
 
 	skb = tbl->proxy_queue.next;
@@ -1224,13 +1225,20 @@ static void neigh_proxy_process(unsigned
 		if (tdif <= 0) {
 			struct net_device *dev = back->dev;
 			__skb_unlink(back, &tbl->proxy_queue);
+
+			/* drop lock to avoid deadlock */
+			spin_unlock(&tbl->proxy_queue.lock);
+
 			if (tbl->proxy_redo && netif_running(dev))
 				tbl->proxy_redo(back);
 			else
 				kfree_skb(back);
 
 			dev_put(dev);
-		} else if (!sched_next || tdif < sched_next)
+			goto rescan;
+		}
+
+		if (!sched_next || tdif < sched_next)
 			sched_next = tdif;
 	}
 	del_timer(&tbl->proxy_timer);
-- 
1.4.1

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists