From: Patrick McHardy <kaber@trash.net>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: Ben Greear <greearb@candelatech.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Linux Netdev List <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: IPv4/IPv6 sysctl unregistration deadlock
Date: Mon, 02 Mar 2009 12:07:11 +0100 [thread overview]
Message-ID: <49ABBDDF.4030805@trash.net> (raw)
In-Reply-To: <20090227103812.14af52b3@nehalam>
Stephen Hemminger wrote:
> On Fri, 27 Feb 2009 10:26:43 -0800
> Ben Greear <greearb@candelatech.com> wrote:
>
>> Stephen Hemminger wrote:
>>
>>> Subject: [PATCH] Avoid race between network down and sysfs
>>>
>>>
>>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>>>
>>> --- a/net/core/net-sysfs.c 2009-02-26 08:36:18.000000000 -0800
>>> +++ b/net/core/net-sysfs.c 2009-02-26 08:37:51.000000000 -0800
>>> @@ -77,7 +77,9 @@ static ssize_t netdev_store(struct devic
>>> if (endp == buf)
>>> goto err;
>>>
>>> - rtnl_lock();
>>> + if (!rtnl_trylock())
>>> + return -ERESTARTSYS;
>>> +
>>> if (dev_isalive(net)) {
>>> if ((ret = (*set)(net, new)) == 0)
>>> ret = len;
>> I can test this to see if it fixes my problem. Are the above lines the
>> entirety of the patch?
>
> yes
We should be able to avoid the restart looping in most cases,
we only need to do this while unregistration is in progress.
next prev parent reply other threads:[~2009-03-02 11:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-25 5:23 IPv4/IPv6 sysctl unregistration deadlock Patrick McHardy
2009-02-25 6:19 ` Herbert Xu
2009-02-25 6:23 ` Patrick McHardy
2009-02-25 7:18 ` Patrick McHardy
2009-02-25 8:43 ` Herbert Xu
2009-02-26 6:06 ` Eric W. Biederman
2009-02-26 6:10 ` Eric W. Biederman
2009-02-26 6:22 ` Herbert Xu
2009-02-26 7:18 ` Eric W. Biederman
2009-02-26 16:49 ` Stephen Hemminger
2009-02-26 19:01 ` Eric W. Biederman
2009-02-26 20:24 ` Stephen Hemminger
2009-02-27 0:59 ` Herbert Xu
2009-02-27 1:25 ` Stephen Hemminger
2009-02-27 18:26 ` Ben Greear
2009-02-27 18:38 ` Stephen Hemminger
2009-03-02 11:07 ` Patrick McHardy [this message]
2009-03-02 11:21 ` Patrick McHardy
2009-03-02 22:11 ` Ben Greear
2009-03-02 22:20 ` Patrick McHardy
2009-03-02 22:47 ` David Miller
2009-03-02 23:03 ` Patrick McHardy
2009-03-03 8:48 ` David Miller
2009-03-08 3:36 ` Eric W. Biederman
2009-02-26 16:55 ` Stephen Hemminger
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=49ABBDDF.4030805@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=greearb@candelatech.com \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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.