wifi: cfg80211: add locked debugfs wrappers
authorJohannes Berg <johannes.berg@intel.com>
Fri, 24 Nov 2023 16:25:27 +0000 (17:25 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 27 Nov 2023 10:24:58 +0000 (11:24 +0100)
commitb590b9ae1efc30e52f81d95cdb2519a4c248b965
tree15d3e56e69e51633bb335380afbf25268ea26db2
parent8c88a474357ead632b07c70bf7f119ace8c3b39e
wifi: cfg80211: add locked debugfs wrappers

Add wrappers for debugfs files that should be called with
the wiphy mutex held, while the file is also to be removed
under the wiphy mutex. This could otherwise deadlock when
a file is trying to acquire the wiphy mutex while the code
removing it holds the mutex but waits for the removal.

This actually works by pushing the execution of the read
or write handler to a wiphy work that can be cancelled
using the debugfs cancellation API.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/debugfs.c