From: Dan Carpenter <error27@gmail.com>
To: nbd@openwrt.org
Cc: linux-wireless@vger.kernel.org
Subject: potential null deref in minstrel_ht_update_caps()?
Date: Thu, 22 Jul 2010 13:09:33 +0200 [thread overview]
Message-ID: <20100722110933.GA17585@bicker> (raw)
This is a smatch thing.
net/mac80211/rc80211_minstrel_ht.c +639 minstrel_ht_update_caps(15)
warn: variable dereferenced before check 'sta'
631 struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
632 struct ieee80211_local *local = hw_to_local(mp->hw);
633 u16 sta_cap = sta->ht_cap.cap;
^^^^^^^^^^^^^^^
Dereferenced here.
634 int ack_dur;
635 int stbc;
636 int i;
637
638 /* fall back to the old minstrel for legacy stations */
639 if (sta && !sta->ht_cap.ht_supported) {
^^^
Checked here.
640 msp->is_ht = false;
641 memset(&msp->legacy, 0, sizeof(msp->legacy));
It seems like a bug, but I'm not sure how to deal with it.
regards,
dan carpenter
next reply other threads:[~2010-07-22 11:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 11:09 Dan Carpenter [this message]
2010-07-22 19:35 ` potential null deref in minstrel_ht_update_caps()? John W. Linville
2010-07-22 19:39 ` [PATCH] minstrel_ht: remove unnecessary NULL check in minstrel_ht_update_caps John W. Linville
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=20100722110933.GA17585@bicker \
--to=error27@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@openwrt.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).