netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: davem@davemloft.net
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH 4/4] mac80211: avoid null ptr deref in ieee80211_ibss_add_sta
Date: Wed, 30 May 2007 14:30:33 -0400	[thread overview]
Message-ID: <20070530183033.GG3610@tuxdriver.com> (raw)
In-Reply-To: <20070530182946.GF3610@tuxdriver.com>

From: John W. Linville <linville@tuxdriver.com>

avoid sdata null pointer dereference in ieee80211_ibss_add_sta.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 net/mac80211/ieee80211_sta.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index dbac858..9f30ae4 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -2997,7 +2997,7 @@ struct sta_info * ieee80211_ibss_add_sta(struct net_device *dev,
 {
 	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
 	struct sta_info *sta;
-	struct ieee80211_sub_if_data *sdata = NULL;
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
 	/* TODO: Could consider removing the least recently used entry and
 	 * allow new one to be added. */
-- 
1.5.0.6

-- 
John W. Linville
linville@tuxdriver.com

  reply	other threads:[~2007-05-30 19:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-30 18:25 [PATCH 0/4] mac80211 fixes for 2.6.22 John W. Linville
     [not found] ` <20070530182538.GB3610-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2007-05-30 18:28   ` [PATCH 1/4] mac80211: fail back to use associate from reassociate John W. Linville
2007-05-30 18:28     ` [PATCH 2/4] mac80211: fix memory leak when defrag fragments John W. Linville
     [not found]       ` <20070530182858.GE3610-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2007-05-30 18:29         ` [PATCH 3/4] mac80211: always set carrier status on open John W. Linville
2007-05-30 18:30           ` John W. Linville [this message]
2007-05-31  8:25   ` [PATCH 0/4] mac80211 fixes for 2.6.22 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070530183033.GG3610@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=davem@davemloft.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).