]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211_hwsim: calculate if_combination.max_interfaces
authorJohannes Berg <johannes.berg@intel.com>
Fri, 29 Mar 2019 07:56:22 +0000 (08:56 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 8 Apr 2019 11:31:24 +0000 (13:31 +0200)
commitbaa7e9996e73cc8970a513ead01bbbdf51732efc
treed40f93ed046c8974e4d2b2c0962e3ec6934ceb29
parent00a50fcb3c668e5562266a9799db5685c224fd7a
mac80211_hwsim: calculate if_combination.max_interfaces

If we just set this to 2048, and have multiple limits you
can select from, the total number might run over and cause
a warning in cfg80211. This doesn't make sense, so we just
calculate the total max_interfaces now.

Reported-by: syzbot+8f91bd563bbff230d0ee@syzkaller.appspotmail.com
Fixes: e78bec0d2ba0 ("mac80211_hwsim: allow setting iftype support")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c