On Wed, 11 Jul 2007, Tejun Heo wrote: > Alright, there's our confusion. I thought you were gonna use dev->sem > to protect new device addition && driver binding. We can use the same > rwsem directly for binding protection too but I guess there's no big > difference one way or the other.
The rwsem should not be used for binding protection. If we did trylock then binding at the wrong time would fail, which would be bad. If we did down_read then we would probably block while holding a device semaphore, which also would be bad. > Thanks for enlightening me. Probably what can be done is blocking > regular file sysfs nodes automatically and make it optional (optionally > enable or disable) for bin attrs. Maybe. At the moment I don't see any reason to treat binary attributes different from text. It would also be good to find out whether there are any long-running sysfs callbacks. Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/