-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ToUserDevice+FromUserDevice unsafe across /click/config changes #123
Comments
I don't completely agree. ToUserDevice::cleanup() is trying to spin until no one is waiting for it (see the _exit boolean and the loop). That might be insufficient/incorrect, but I think something simpler is missing. cleanup() should walk over elem_map[] and set all entries that equal |
What if we're in the middle of ToUserDevice::dev_read when /dev/config is written? I guess it doesn't matter why the Since SMP version of the issue:
|
If we;'re in the middle of dev_read then we should have the lock. That's On Wed, Apr 30, 2014 at 12:19 PM, pallas notifications@github.com wrote:
|
Sorry, I ahve a deadline so take my effluvia as weak. But there is On Wed, Apr 30, 2014 at 12:20 PM, Eddie Kohler ekohler@gmail.com wrote:
|
So I have good newses and bad news. The bad news is that I verified that this is actually a problem. The good news is that it is very rare and I have a patch, which I'll prepare for pull soon. The other good news is that the more frequent problem was a local change to replace |
I would love to see cdev_init as a patch, fwiw. |
With the following program, slow_read,
install the /click/config
and then
and watch the kernel crashes.
The issue is that the methods of
ToUserDevice
are not synchronized with the click config in any way, so while they are usingelem
it might disappear out from under them. It seems like clickfs might need to export the read versions oflock_config
andunlock_config
in order to prevent this from happening whileelem
is live.I can implement that solution @kohler, but I wanted to get your take first. It also is not clear to me whether the router should be blocked + unblocked as well.
The text was updated successfully, but these errors were encountered: