Re: IPv4/IPv6 sysctl unregistration deadlock

From
Eric W. Biederman <hidden>
Date
2009-02-26 06:10:01
Reply to
Herbert Xu, 2009-02-25
Herbert Xu [off-list ref] writes:
On Wed, Feb 25, 2009 at 08:18:47AM +0100, Patrick McHardy wrote:
quoted
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.
quoted
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.
quoted
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

Thread (25 messages) 25 messages, 6 authors, last reply 2009-03-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help