linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented
@ 2015-11-09 21:02 Ola Olsson
  2015-11-26 16:44 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Ola Olsson @ 2015-11-09 21:02 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Ola Olsson, Ola Olsson

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
---
 net/wireless/ocb.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/wireless/ocb.c b/net/wireless/ocb.c
index c00d4a7..e64dbf1 100644
--- a/net/wireless/ocb.c
+++ b/net/wireless/ocb.c
@@ -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;
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented
  2015-11-09 21:02 [PATCH] cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented Ola Olsson
@ 2015-11-26 16:44 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-11-26 16:44 UTC (permalink / raw)
  To: Ola Olsson; +Cc: linux-wireless, Ola Olsson

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-26 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 21:02 [PATCH] cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented Ola Olsson
2015-11-26 16:44 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).