]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: iwlwifi: mvm: fix add stream vs. restart race
authorJohannes Berg <johannes.berg@intel.com>
Sat, 28 Dec 2024 20:34:18 +0000 (22:34 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 13 Jan 2025 14:26:41 +0000 (15:26 +0100)
commitc866a9852398fe74f3db14154e667fa8eb6da082
tree07d8c99441d89bbfcb6f3dcbb151f991177e941b
parent9e28fcabce7070ab73782dea1452fee871f562a0
wifi: iwlwifi: mvm: fix add stream vs. restart race

My recent restart related work has made this race more likely
to happen and we've now noticed it, but it seems that it was
always possible. The race is that the add stream work can be
scheduled just before a restart is scheduled and then execute
before the restart, accessing the device while it's doing the
restart and not accessible.

To fix this, check if the device is restarting and abort the
work in that case. Reschedule it after the restart as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241228223206.9c30af039b4d.I1a32936776f8ba5e83dda0a68ffc2722d9d37950@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.c