From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Jesper Juhl <jj@chaosbits.net>,
"Skidmore, Donald C" <donald.c.skidmore@intel.com>
Cc: e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>,
"David S. Miller" <davem@davemloft.net>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
netdev <netdev@vger.kernel.org>
Subject: Re: Intel ixgbe: uninitialized variable use in ixgbe_non_sfp_link_config()
Date: Sun, 08 Jan 2012 21:07:28 -0800 [thread overview]
Message-ID: <1326085648.2641.9.camel@jtkirshe-mobl> (raw)
In-Reply-To: <alpine.LNX.2.00.1201082215310.24030@swampdragon.chaosbits.net>
[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]
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.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next parent reply other threads:[~2012-01-09 5:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LNX.2.00.1201082215310.24030@swampdragon.chaosbits.net>
2012-01-09 5:07 ` Jeff Kirsher [this message]
2012-01-10 0:24 ` Intel ixgbe: uninitialized variable use in ixgbe_non_sfp_link_config() Skidmore, Donald C
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326085648.2641.9.camel@jtkirshe-mobl \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=donald.c.skidmore@intel.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=jesse.brandeburg@intel.com \
--cc=jj@chaosbits.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).