]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix a kernel panic when TXing after TXQ teardown
authorSara Sharon <sara.sharon@intel.com>
Sat, 15 Dec 2018 09:03:10 +0000 (11:03 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 18 Dec 2018 12:03:32 +0000 (13:03 +0100)
commit8704ee219593b654fb4694b4f34278926a11969c
treecbffbae9790f918f7ac323268a6e1148488670a9
parent63d955a3818618bb8a6bcc742112c3a358a4259f
mac80211: fix a kernel panic when TXing after TXQ teardown

Recently TXQ teardown was moved earlier in ieee80211_unregister_hw(),
to avoid a use-after-free of the netdev data. However, interfaces
aren't fully removed at the point, and cfg80211_shutdown_all_interfaces
can for example, TX a deauth frame. Move the TXQ teardown to the
point between cfg80211_shutdown_all_interfaces and the free of
netdev queues, so we can be sure they are torn down before netdev
is freed, but after there is no ongoing TX.

Fixes: a5f29d08a87a ("mac80211: Run TXQ teardown code before de-registering interfaces")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/iface.c
net/mac80211/main.c