]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211_hwsim: drop pending frames on stop
authorJohannes Berg <johannes.berg@intel.com>
Mon, 17 May 2021 15:04:31 +0000 (17:04 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 31 May 2021 19:27:07 +0000 (21:27 +0200)
commit2989a1c7714fd7d432e6785a2682a8c6ae615c6d
tree5a6e1cc211f1f96e19acf1cbda018fff636375c2
parentf747515308c21c6cda0bf6c451b039e8f412a08c
mac80211_hwsim: drop pending frames on stop

Syzbot reports that we may be able to get into a situation where
mac80211 has pending ACK frames on shutdown with hwsim. It appears
that the reason for this is that syzbot uses the wmediumd hooks to
intercept/injection frames, and may shut down hwsim, removing the
radio(s), while frames are pending in the air simulation.

Clean out the pending queue when the interface is stopped, after
this the frames can't be reported back to mac80211 properly anyway.

Reported-by: syzbot+a063bbf0b15737362592@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20210517170429.b0f85ab0eda1.Ie42a6ec6b940c971f3441286aeaaae2fe368e29a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c