2013-05-28 21:20:18

by Felix Fietkau

[permalink] [raw]
Subject: [PATCH] cfg80211: fix a crash in the active monitor check

flags can be NULL

Signed-off-by: Felix Fietkau <[email protected]>
---
net/wireless/nl80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 820b756..ede00e2 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2391,7 +2391,7 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
change = true;
}

- if ((*flags & NL80211_MNTR_FLAG_ACTIVE) &&
+ if (flags && (*flags & NL80211_MNTR_FLAG_ACTIVE) &&
!(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR))
return -EOPNOTSUPP;

--
1.8.0.2



2013-05-29 07:11:19

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] cfg80211: fix a crash in the active monitor check

On Tue, 2013-05-28 at 23:20 +0200, Felix Fietkau wrote:
> flags can be NULL

I merged this into the original patch and also fixed the kernel-doc for
you while at it.

johannes