OSDN Git Service

cfg80211: check reg_rule for NULL in handle_channel_custom()
authorJohannes Berg <johannes.berg@intel.com>
Fri, 21 Feb 2020 09:44:50 +0000 (10:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Mar 2020 10:55:52 +0000 (11:55 +0100)
commit81aebc37d223ca58c9102399c38fce601cb1b084
tree2b4a6dd1f21914de2e00c30a02496521a71d81f5
parent70056047a678e9325bada5efbb7d3a0cf6ac343f
cfg80211: check reg_rule for NULL in handle_channel_custom()

[ Upstream commit a7ee7d44b57c9ae174088e53a668852b7f4f452d ]

We may end up with a NULL reg_rule after the loop in
handle_channel_custom() if the bandwidth didn't fit,
check if this is the case and bail out if so.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200221104449.3b558a50201c.I4ad3725c4dacaefd2d18d3cc65ba6d18acd5dbfe@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/reg.c