On Tue, 2024-09-24 at 12:11 +0300, Kalle Valo wrote: > > I don't think this is an issue here, but I'm not sure if you're aware > > that in general, locking the wiphy mutex in some debugfs file handlers > > can lead to deadlocks, specifically if those files are later _removed_ > > while holding the wiphy lock, as is e.g. the case for station, netdev > > and link debugfs files. For this, we have wiphy_locked_debugfs_read() > > and wiphy_locked_debugfs_write() [1]. > > > > [1] you are not required to understand how they are implemented ;-) > > Thanks, this is good to know. I'm not that worried about that, at least > it's not showing up in my tests, so my plan is to fix that in a separate > patchset. I don't think you'd ever even find that in tests, as far as I know lockdep cannot track these dependencies, and to actually deadlock you'd have to have the debugfs file(s) kept open by userspace while they're removed. In any case, just wanted to give a heads-up that this might be required in some (future) cases, I didn't see any here where it was needed. johannes