lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 11 Oct 2011 23:58:33 -0700
From:	John Fastabend <john.r.fastabend@...el.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC:	"e1000-devel@...ts.sourceforge.net" 
	<e1000-devel@...ts.sourceforge.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: ixgbe: fixup hard dependencies on supporting 8 traffic classes

On 10/11/2011 11:35 PM, Dan Carpenter wrote:
> Hello John Fastabend,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch 32701dc2e616: "ixgbe: fixup hard dependencies on supporting
> 8 traffic classes" from Sep 27, 2011, leads to the following Smatch
> complaint:
> 
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +3366 ixgbe_configure_dcb()
> 	 error: we previously assumed 'adapter->ixgbe_ieee_ets' could be null (see line 3357)
> 
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>   3356	
>   3357			if (adapter->ixgbe_ieee_ets) {
>                             ^^^^^^^^^^^^^^^^^^^^^^^
> Null check.
> 
>   3358				struct ieee_ets *ets = adapter->ixgbe_ieee_ets;
>   3359				int max_frame = dev->mtu + ETH_HLEN + ETH_FCS_LEN;
>   3360	
>   3361				ixgbe_dcb_hw_ets(&adapter->hw, ets, max_frame);
>   3362			}
>   3363	
>   3364			if (adapter->ixgbe_ieee_pfc) {
>   3365				struct ieee_pfc *pfc = adapter->ixgbe_ieee_pfc;
>   3366				u8 *prio_tc = adapter->ixgbe_ieee_ets->prio_tc;
>                                               ^^^^^^^^^^^^^^^^^^^^^^^^^
> New dereference.
> 
>   3367	
>   3368				ixgbe_dcb_hw_pfc_config(&adapter->hw, pfc->pfc_en,
> 
> regards,
> dan carpenter
> 

Actually both structures ixgbe_ieee_ets and ixgbe_ieee_pfc get initialized
at the same time. So no null dereference will occur. That said this snippit
should be fixed.

I'll send a patch to JeffK. Thanks for the catch Dan.

.John
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ