From: ebiederm@xmission.com (Eric W. Biederman)
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Patrick McHardy <kaber@trash.net>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: IPv4/IPv6 sysctl unregistration deadlock
Date: Wed, 25 Feb 2009 22:10:33 -0800 [thread overview]
Message-ID: <m163ixk9t2.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20090225084321.GA1101@gondor.apana.org.au> (Herbert Xu's message of "Wed\, 25 Feb 2009 16\:43\:21 +0800")
Herbert Xu <herbert@gondor.apana.org.au> writes:
> On Wed, Feb 25, 2009 at 08:18:47AM +0100, Patrick McHardy wrote:
>>
>> Unfortunately its more complicated than I thought because of
>> device renames, where the sysctl pointer is reused after
>> unregistration and the rename/unregistration/re-registration
>> should be atomic. Deferring unregistration means we can't perform
>> the new registration immediately unless we allow multiple
>> registrations for a single device to be active simulaneously,
>> which introduces a whole new set of problems.
>
> Good point.
>
>> Simply ignoring the request during unregistration doesn't seem
>> so bad after all, the main problem is that it intoduces a different
>> race on renames where a write to the "forwarding" file returns
>> success, but the change doesn't take effect. We could return
>> -ENOENT, but that seems a bit strange after open() returned success.
>> Maybe -EBUSY, although I would prefer to make this transparent
>> to userspace.
>
> I'd like to avoid that for the rename case just because shell
> scripts know how to deal with echo foo > /nonexist/file but not
> necessarily a failed echo on write/close.
>
>> I think I'm stuck. Will rethink it after some coffee :)
>
> Yes we need more coffee :)
How does adding a rename operation to sysctl sound?
I am a little concerned that if we have this issue with sysctl
we also have it with proc and sysfs as well.
Although I admit I don't understand it yet.
Eric
next prev parent reply other threads:[~2009-02-26 6:10 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 [this message]
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
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=m163ixk9t2.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=herbert@gondor.apana.org.au \
--cc=kaber@trash.net \
--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;
as well as URLs for NNTP newsgroup(s).