projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9951ebf
)
cfg80211: check reg_rule for NULL in handle_channel_custom()
author
Johannes Berg
<johannes.berg@intel.com>
Fri, 21 Feb 2020 09:44:50 +0000
(10:44 +0100)
committer
Johannes Berg
<johannes.berg@intel.com>
Fri, 21 Feb 2020 09:59:27 +0000
(10:59 +0100)
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>
net/wireless/reg.c
patch
|
blob
|
history
diff --git
a/net/wireless/reg.c
b/net/wireless/reg.c
index
fff9a74
..
1a8218f
100644
(file)
--- a/
net/wireless/reg.c
+++ b/
net/wireless/reg.c
@@
-2276,7
+2276,7
@@
static void handle_channel_custom(struct wiphy *wiphy,
break;
}
- if (IS_ERR(reg_rule)) {
+ if (IS_ERR
_OR_NULL
(reg_rule)) {
pr_debug("Disabling freq %d MHz as custom regd has no rule that fits it\n",
chan->center_freq);
if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) {