Re: IPv4/IPv6 sysctl unregistration deadlock
From: Stephen Hemminger <hidden>
Date: 2009-02-26 20:24:54
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 sysfsAs 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.