Re: [PATCH] fix bad locking in drivers/base/driver.c

From: Linus Torvalds
Date: Tue Jan 25 2005 - 11:30:26 EST




Hmm.. I certainly like the "use completions" patch, since it makes it a
lot more obvious what is going on (and it is what completions were
designed for).

However, since it does change semantics very subtly: if you call
"driver_unregister()" twice (which is wrong, but looking at the code it
looks like it would just silently have worked), the old code would just
ignore it. The new code will block on the second one.

Now, I don't mind the blocking (it's a bug to call it twice, and blocking
should even give a nice callback when you do the "show tasks" sysrq, so
it's a good way to _find_ the bug), but together with Mike's comment about
"Compile-tested only", I'd really like somebody (Greg?) to say "trying to
doubly remove the driver is so illegal that we don't care, and btw, I
tested it and it's all ok".

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/