linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: arend@broadcom.com
Cc: linux-wireless@vger.kernel.org
Subject: re: net: wireless: add brcm80211 drivers
Date: Sun, 13 May 2012 20:43:33 +0300	[thread overview]
Message-ID: <20120513174333.GB4280@elgon.mountain> (raw)

Hi Arend,

This code is not really new, but I thought I would email you anyway
because I know you are responsive.  :)

The patch 5b435de0d786: "net: wireless: add brcm80211 drivers" from 
Oct 5, 2011, leads to the following Smatch complaint:

drivers/net/wireless/brcm80211/brcmsmac/ampdu.c:741 brcms_c_sendampdu()
	 warn: variable dereferenced before check 'p' (see line 739)

drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
   733                  /*
   734                   * check to see if the next pkt is
   735                   * a candidate for aggregation
   736                   */
   737                  p = pktq_ppeek(&qi->q, prec);
   738			/* tx_info must be checked with current p */
   739			tx_info = IEEE80211_SKB_CB(p);
                                  ^^^^^^^^^^^^^^^^
"p" is dereferenced inside the call to IEEE80211_SKB_CB().

   740	
   741			if (p) {
                           ^^^
Checked too late.

   742				if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) &&
   743				    ((u8) (p->priority) == tid)) {

regards,
dan carpenter


             reply	other threads:[~2012-05-13 17:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-13 17:43 Dan Carpenter [this message]
2012-05-14  7:07 ` net: wireless: add brcm80211 drivers Arend van Spriel
2012-05-14  8:34   ` Dan Carpenter
2012-05-14  9:06     ` Arend van Spriel
2012-05-14  9:28       ` Dan Carpenter
2012-05-14 11:45     ` Julia Lawall
  -- strict thread matches above, loose matches on Subject: below --
2012-08-05 19:57 Dan Carpenter
2012-08-06  8:50 ` Arend van Spriel
2016-06-27 13:22 Dan Carpenter
2016-06-27 19:12 ` Dan Carpenter

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=20120513174333.GB4280@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=arend@broadcom.com \
    --cc=linux-wireless@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).