From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: David Miller <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
James Morris <jmorris@namei.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [RFC PATCH] unlock rtnl mutex in ic_open_devs while waiting
Date: Mon, 05 Jan 2015 14:52:06 +0100 [thread overview]
Message-ID: <54AA9706.5020202@canonical.com> (raw)
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;
next reply other threads:[~2015-01-05 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 13:52 Maarten Lankhorst [this message]
2015-01-06 22:21 ` [RFC PATCH] unlock rtnl mutex in ic_open_devs while waiting David Miller
2015-01-07 10:06 ` Maarten Lankhorst
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=54AA9706.5020202@canonical.com \
--to=maarten.lankhorst@canonical.com \
--cc=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.