linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] unlock rtnl mutex in ic_open_devs while waiting
@ 2015-01-05 13:52 Maarten Lankhorst
  2015-01-06 22:21 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Maarten Lankhorst @ 2015-01-05 13:52 UTC (permalink / raw)
  To: David Miller, Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
	Patrick McHardy
  Cc: netdev, LKML

This fixes a deadlock with alx_link_check, which takes the rtnl_mutex in
a work item to check the link.

I have no idea whether alx should be fixed or ipconfig.c,
but this saves 120 seconds off my boot time. ;-)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
---
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 7fa18bc7e47f..c8aa15a0cdf4 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -270,7 +270,9 @@ static int __init ic_open_devs(void)
 			if (ic_is_init_dev(dev) && netif_carrier_ok(dev))
 				goto have_carrier;
 
+		rtnl_unlock();
 		msleep(1);
+		rtnl_lock();
 
 		if (time_before(jiffies, next_msg))
 			continue;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-07 10:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05 13:52 [RFC PATCH] unlock rtnl mutex in ic_open_devs while waiting Maarten Lankhorst
2015-01-06 22:21 ` David Miller
2015-01-07 10:06   ` Maarten Lankhorst

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).