Search Linux Wireless

[bug report] mac80211: allow setting spatial reuse parameters from bss_conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux