]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: pmsr: fix abort locking
authorJohannes Berg <johannes.berg@intel.com>
Wed, 6 Feb 2019 06:03:10 +0000 (08:03 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 Feb 2019 09:38:00 +0000 (10:38 +0100)
commit0010116fc8f8886e16be3b2a506bf7658efbc70e
tree0b9cf425f5f048eb41607af2573d7fd58d5bcfa7
parent0d73215bdac8966bf457d328313de4c2b35d5f16
cfg80211: pmsr: fix abort locking

When we destroy the interface we already hold the wdev->mtx
while calling cfg80211_pmsr_wdev_down(), which assumes this
isn't true and flushes the worker that takes the lock, thus
leading to a deadlock.

Fix this by refactoring the worker and calling its code in
cfg80211_pmsr_wdev_down() directly.

We still need to flush the work later to make sure it's not
still running and will crash, but it will not do anything.

Fixes: f5b4872af518 ("cfg80211: add peer measurement with FTM initiator API")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c
net/wireless/pmsr.c