cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented
PATCH 1/1 cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented
Signed-off-by Ola Olsson <[email protected]>
--- net/wireless/ocb.c | 3 +++ 1 file changed, 3 insertions(+)
net/wireless/ocb.c +3 -0
@@ -29,6 +29,9 @@ int __cfg80211_join_ocb(struct cfg80211_registered_device *rdev,if (dev->ieee80211_ptr->iftype !=NL80211_IFTYPE_OCB )return -EOPNOTSUPP ; +if (!rdev->ops->join_ocb) +return -EOPNOTSUPP ; +if (WARN_ON (!setup->chandef.chan))return -EINVAL ;
Signature · 1 line
1.7.9.5
Applied, but only to mac80211-next as it's not really relevant - all drivers actually advertising OCB mode (should) have the pointer, and the iftype is checked here.
johannes