Thread (1 message) 1 message, 1 author, 2011-05-20

Re: [PATCH v3 0/2] Fix uevent race in register_netdevice()

From: Kalle Valo <hidden>
Date: 2011-05-20 12:09:03
Also in: linux-wireless, lkml

David Miller [off-list ref] writes:
From: Kalle Valo <redacted>
Date: Mon, 16 May 2011 17:46:30 +0300
quoted
I'm trying to fix a race in register_netdevice(). The problem is that
there's a uevent to userspace before the netdevice is ready for use. The
problem is described here:

https://bugzilla.kernel.org/show_bug.cgi?id=15606

I have sent few different ways to fix this, but none of them have been
really usable. Now I came up with a way which changes the driver core
to make it possible send the uevent in a separate call. This is a clean
and safe way to fix the race. Downside is that two new functions are
added to the driver core interface.

Please comment.
This doesn't work.

The sysfs file will still be there before the uevent, so any
process can go in there, and see the inconsistent state.
I considered that user space would not notice the device until the
uevent is emitted so that wouldn't matter that much.

But it's back to the drawing board again. I'm running out of options
how to do this in a not so intrusive way. Do you have any tips how to
fix the race for good?

-- 
Kalle Valo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help