Re: IPv4/IPv6 sysctl unregistration deadlock

From
Stephen Hemminger <hidden>
Date
2009-02-26 20:24:54
Reply to
Eric W. Biederman, 2009-02-26
On Thu, 26 Feb 2009 11:01:41 -0800
ebiederm@xmission.com (Eric W. Biederman) wrote:
Stephen Hemminger [off-list ref] writes:
quoted
What about something like this:

Subject: [PATCH] Avoid race between network down and sysfs
As far as solutions go.  That looks like the easiest correct solution.
So.  
Acked-by: "Eric W. Biederman" <redacted>


Will -ERESTARTSYS trigger the in kernel restart logic in this case?

There are a lot more cases to cover, and I don't I like it long
term.  Spinning waiting for rtnl_lock feels wrong.  Plus it does
not help with discovering the problem in new sysfs, sysctl, or
proc files.

It has the major advantage that we can fix things now.
I haven't tested it, but it should restart in VFS.
Spinning is not that big a deal, and it also handles the case
where the name changed or some other race occurred during processing.
When syscall is re-entered, the name will no longer be found and
-ENOENT will be returned.
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