Search Linux Wireless

re: iwlagn: use 6 Mbps rate for no-CCK scans

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

 



Hi Dan,

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

:-)

> The patch 3a8aea098c8e: "iwlagn: use 6 Mbps rate for no-CCK scans" 
> from Oct 14, 2011, leads to the following Smatch complaint:
> 
> drivers/net/wireless/iwlwifi/iwl-scan.c +782 iwlagn_request_scan()
> 	 error: we previously assumed 'priv->scan_request' could be null (see line 681)
> 
> drivers/net/wireless/iwlwifi/iwl-scan.c
>    680					       >> RXON_FLG_CHANNEL_MODE_POS;
>    681			if ((priv->scan_request && priv->scan_request->no_cck) ||
>                              ^^^^^^^^^^^^^^^^^^
> newly introduced check.  (Probably not needed.  Nothing else in this
> function checks this).

...

>    777		switch (priv->scan_type) {
>    778		case IWL_SCAN_NORMAL:
>    779			cmd_len = iwl_fill_probe_req(priv,
>    780						(struct ieee80211_mgmt *)scan->data,
>    781						vif->addr,
>    782						priv->scan_request->ie,
>                                                 ^^^^^^^^^^^^^^^^^^^^
> unchecked dereference.

Right, well ... if scan_type == IWL_SCAN_NORMAL, priv->scan_request must
exist, but if it's another scan type, priv->scan_request will not exist,
and the newly introduced check is executed in all cases.

johannes

--------------------------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland 
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux