linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix possible null-pointer dereference
@ 2010-09-20 22:57 Christian Lamparter
  2010-09-24 18:00 ` John W. Linville
  0 siblings, 1 reply; 13+ messages in thread
From: Christian Lamparter @ 2010-09-20 22:57 UTC (permalink / raw)
  To: linux-wireless; +Cc: John W. Linville

net/mac80211/mesh_plink.c +574 mesh_rx_plink_frame(168)
error: we previously assumed 'sta' could be null.

This bug was detected by smatch.
( http://repo.or.cz/w/smatch.git )

Cc: <stable@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index ea13a80..1d7c564 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -473,7 +473,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
 	rcu_read_lock();
 
 	sta = sta_info_get(sdata, mgmt->sa);
-	if (!sta && ftype != PLINK_OPEN) {
+	if (!sta || ftype != PLINK_OPEN) {
 		mpl_dbg("Mesh plink: cls or cnf from unknown peer\n");
 		rcu_read_unlock();
 		return;

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

end of thread, other threads:[~2010-10-08 18:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 22:57 [PATCH] mac80211: fix possible null-pointer dereference Christian Lamparter
2010-09-24 18:00 ` John W. Linville
2010-09-24 22:02   ` [RFC v2] " Christian Lamparter
2010-09-29  5:18     ` Jouni Malinen
2010-09-30 16:27     ` Bob Copeland
2010-09-30 16:52       ` Christian Lamparter
2010-10-01  8:25         ` Dan Carpenter
2010-10-07 22:38     ` Steve deRosier
2010-10-07 22:54       ` Johannes Berg
2010-10-08 17:56         ` Javier Cardona
2010-10-08 18:03           ` Johannes Berg
2010-10-08 18:25             ` Javier Cardona
2010-10-08 18:28               ` 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).