]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: pause TX while changing interface type
authorJohannes Berg <johannes.berg@intel.com>
Fri, 22 Jan 2021 16:11:16 +0000 (17:11 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 26 Jan 2021 10:59:45 +0000 (11:59 +0100)
commitd25bc0decf6ef3a8dc23a6a57834a141f73df14c
tree09a0f558ca3b93667315e19b45582a8f94b3f816
parentdf3889f641605262b218e32ac9879a6c80e823c7
mac80211: pause TX while changing interface type

syzbot reported a crash that happened when changing the interface
type around a lot, and while it might have been easy to fix just
the symptom there, a little deeper investigation found that really
the reason is that we allowed packets to be transmitted while in
the middle of changing the interface type.

Disallow TX by stopping the queues while changing the type.

Fixes: f558681de4db ("mac80211: support runtime interface type changes")
Reported-by: syzbot+d7a3b15976bf7de2238a@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20210122171115.b321f98f4d4f.I6997841933c17b093535c31d29355be3c0c39628@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/iface.c