linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: john@phrozen.org
Cc: linux-wireless@vger.kernel.org
Subject: [bug report] mac80211: allow setting spatial reuse parameters from bss_conf
Date: Thu, 8 Aug 2019 14:25:50 +0300	[thread overview]
Message-ID: <20190808112550.GA15648@mwanda> (raw)

Hello John Crispin,

This is a semi-automatic email about new static checker warnings.

The patch 1ced169cc1c2: "mac80211: allow setting spatial reuse
parameters from bss_conf" from Jul 30, 2019, leads to the following
Smatch complaint:

    net/mac80211/he.c:79 ieee80211_he_spr_ie_to_bss_conf()
    warn: variable dereferenced before check 'he_spr_ie_elem' (see line 75)

net/mac80211/he.c
    69  void
    70  ieee80211_he_spr_ie_to_bss_conf(struct ieee80211_vif *vif,
    71                                  const struct ieee80211_he_spr *he_spr_ie_elem)
    72  {
    73          struct ieee80211_he_obss_pd *he_obss_pd =
    74						&vif->bss_conf.he_obss_pd;
    75		const u8 *data = he_spr_ie_elem->optional;
                                 ^^^^^^^^^^^^^^^^^^^^^^^^
Dereference.

    76	
    77		memset(he_obss_pd, 0, sizeof(*he_obss_pd));
    78	
    79		if (!he_spr_ie_elem)
                    ^^^^^^^^^^^^^^^
Checked too late.

    80			return;
    81	

regards,
dan carpenter

                 reply	other threads:[~2019-08-08 11:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190808112550.GA15648@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=john@phrozen.org \
    --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).