]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix NULL pointer derference when querying regdb
authorHaim Dreyfuss <haim.dreyfuss@intel.com>
Mon, 21 May 2018 20:34:57 +0000 (23:34 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 22 May 2018 08:17:52 +0000 (10:17 +0200)
commit3b402f9605b3f712b59d1b2fbb5d285011dbca78
tree7b1dc7be25d50bc45771666044fad90ed6ff0150
parent5a0968ae64e90bf71a04cc2063880c680bd1a97e
cfg80211: fix NULL pointer derference when querying regdb

Some drivers may call this function when regdb is not initialized yet,
so we need to make sure regdb is valid before trying to access it.

Make sure regdb is initialized before trying to access it in
reg_query_regdb_wmm() and query_regdb().

Reported-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/reg.c