All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: mac80211: support P2P Device abstraction
Date: Tue, 4 Sep 2012 10:20:57 -0700	[thread overview]
Message-ID: <20120904172057.GB19410@mwanda> (raw)
In-Reply-To: <1346775525.3737.36.camel@jlt4.sipsolutions.net>

On Tue, Sep 04, 2012 at 06:18:45PM +0200, Johannes Berg wrote:
> Hi Dan,
> 
> > The patch f142c6b906da: "mac80211: support P2P Device abstraction" 
> > from Jun 18, 2012, leads to the following Smatch complaint:
> > 
> > net/mac80211/iface.c:1168 ieee80211_setup_sdata()
> > 	 error: we previously assumed 'sdata->dev' could be null (see line 1134)
> > 
> > net/mac80211/iface.c
> >   1133		/* only monitor/p2p-device differ */
> >   1134		if (sdata->dev) {
> >                     ^^^^^^^^^^
> > New test.
> > 
> >   1135			sdata->dev->netdev_ops = &ieee80211_dataif_ops;
> >   1136			sdata->dev->type = ARPHRD_ETHER;
> >   1137		}
> > 
> > [snip]
> > 
> >   1167		case NL80211_IFTYPE_MONITOR:
> >   1168			sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP;
> >                         ^^^^^^^^^^^^
> > Old dereference.
> 
> Thanks. I'm aware of the warning (I run smatch), but sdata->dev can only
> be NULL in "case NL80211_IFTYPE_P2P_DEVICE", so adding an extra check in
> the monitor case didn't seem worthwhile.
> 
> It might have been better to use sdata->vif.type != P2P_DEVICE in the
> new test I guess, but then it wouldn't be extensible to new interface
> types like Bluetooth AMP.

Gar.  This was my bad.  I didn't realize the warning was so old.  I
try to only send the automatic emails for new warnings.  I have been
meaning to fix the bug in my script for a while now but this time
I will really do that.

regards,
dan carpenter


  reply	other threads:[~2012-09-04 17:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 16:13 mac80211: support P2P Device abstraction Dan Carpenter
2012-09-04 16:18 ` Johannes Berg
2012-09-04 17:20   ` Dan Carpenter [this message]
2012-09-04 17:27     ` Johannes Berg

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=20120904172057.GB19410@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=johannes@sipsolutions.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.