On Wed, Feb 05, 2025 at 08:14:48PM +0530, Nilay Shroff wrote: > The sysfs attributes are already protected with sysfs/kernfs internal > locking. So acquiring q->sysfs_lock is not needed while accessing sysfs > attribute files. So this change helps avoid holding q->sysfs_lock while > accessing sysfs attribute files. the sysfs/kernfs locking only protects against other accesses using sysfs. But that's not really the most interesting part here. We also want to make sure nothing changes underneath in a way that could cause crashes (and maybe even torn information). We'll really need to audit what is accessed in each method and figure out what protects it. Chances are that sysfs_lock provides that protection in some case right now, and chances are also very high that a lot of this is pretty broken.