]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: populate debugfs only after cfg80211 init
authorJohannes Berg <johannes.berg@intel.com>
Thu, 23 Apr 2020 09:13:49 +0000 (11:13 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 24 Apr 2020 09:30:13 +0000 (11:30 +0200)
commit479dd3078e7f471b78f796f2b2d71d8387b42195
tree7c9cc8736e05fd8f52948f1e5cd39ab0b1cf403d
parentd9bbabe8545cb71621edc10859dfc44ecaf5a46a
mac80211: populate debugfs only after cfg80211 init

When fixing the initialization race, we neglected to account for
the fact that debugfs is initialized in wiphy_register(), and
some debugfs things went missing (or rather were rerooted to the
global debugfs root).

Fix this by adding debugfs entries only after wiphy_register().
This requires some changes in the rate control code since it
currently adds debugfs at alloc time, which can no longer be
done after the reordering.

Reported-by: Jouni Malinen <j@w1.fi>
Reported-by: kernel test robot <rong.a.chen@intel.com>
Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Reported-by: Felix Fietkau <nbd@nbd.name>
Cc: stable@vger.kernel.org
Fixes: ee3bb3b0b17a ("mac80211: fix race in ieee80211_register_hw()")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lore.kernel.org/r/20200423111344.0e00d3346f12.Iadc76a03a55093d94391fc672e996a458702875d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlegacy/3945-rs.c
drivers/net/wireless/intel/iwlegacy/4965-rs.c
drivers/net/wireless/intel/iwlwifi/dvm/rs.c
drivers/net/wireless/intel/iwlwifi/mvm/rs.c
drivers/net/wireless/realtek/rtlwifi/rc.c
include/net/mac80211.h
net/mac80211/main.c
net/mac80211/rate.c
net/mac80211/rate.h
net/mac80211/rc80211_minstrel_ht.c