linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] mac80211: allow setting spatial reuse parameters from bss_conf
@ 2019-08-08 11:25 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-08-08 11:25 UTC (permalink / raw)
  To: john; +Cc: linux-wireless

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-08 11:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-08 11:25 [bug report] mac80211: allow setting spatial reuse parameters from bss_conf Dan Carpenter

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).