Nice example, it proves my previous points:
- you didn't send this to the author of the code, who is very
responsive when you do.
- you didn't send this to the linux-usb-devel list, which is a
very responsive list.
- this is in the file drivers/usb/host/uhci-debug.c, which by
its very nature leads you to believe that this is not critical
code at all. This is true if you look at the code.
- it looks like you could just remove the BKL entirely from this
call, and not just move it around the kmalloc() call. But
since I don't understand all of the different locking rules
inside the uhci-hcd.c driver, I'm not going to do this. I'll
let the author of the driver do that, incase it really matters
(and yes, the locking in the uhci-hcd driver is tricky, but
nicely documented.)
- this file is about to be radically rewritten, to use driverfs
instead of procfs, as the recent messages on linux-usb-devel
state. So any patch you might make will probably be moot in
about 3 days :) Again, contacting the author/maintainer is
the proper thing to do.
- even if you remove the BKL from this code, what have you
achieved? A faster kernel? A very tiny bit smaller kernel,
yes, but not any faster overall. This is not on _any_
critical
path.
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/