[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1326085648.2641.9.camel@jtkirshe-mobl>
Date: Sun, 08 Jan 2012 21:07:28 -0800
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: Jesper Juhl <jj@...osbits.net>,
"Skidmore, Donald C" <donald.c.skidmore@...el.com>
Cc: e1000-devel Mailing List <e1000-devel@...ts.sourceforge.net>,
"David S. Miller" <davem@...emloft.net>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
netdev <netdev@...r.kernel.org>
Subject: Re: Intel ixgbe: uninitialized variable use in
ixgbe_non_sfp_link_config()
On Sun, 2012-01-08 at 22:21 +0100, Jesper Juhl wrote:
> Hi
>
> In ixgbe_non_sfp_link_config(), the variable 'negotiation' is declared
> without initializer and unless we take the true branch in the 'if
> ((!autoneg) && (hw->mac.ops.get_link_capabilities))' statement it will
> remain uninitialized when it is subsequently read in the 'ret =
> hw->mac.ops.setup_link(hw, autoneg, negotiation, link_up)' statement.
>
> The test of 'ret' after the 'if ((!autoneg) &&
> (hw->mac.ops.get_link_capabilities))' statement also looks fairly
> pointless if we do not take the true branch, since then 'ret' will not
> have been changed since the previous identical test.
>
> The correct fix escapes me since I don't really know this code (and don't
> plan to spend the time to get to know it), but I thought I'd just report
> what I had noticed and then someone else can hopefully come up with a good
> fix :-)
>
>
> PS. Please CC me on replies.
>
Adding netdev mailing list and Don Skidmore (ixgbe maintainer)
Removed Bruce Allan (e1000e maintainer)
I see the potential issue you are referring to, I will defer to Don to
either explain the reasoning in the logic or suggest a fix.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists