mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Kangjie Lu <kjlu@umn.edu>
Cc: pakki001@umn.edu, "David S. Miller" <davem@davemloft.net>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: 80003es2lan: fix a missing check of read failure
Date: Fri, 21 Dec 2018 11:18:58 -0800	[thread overview]
Message-ID: <7478abbc4022a29414367cacdac1b89bff18c54c.camel@intel.com> (raw)
In-Reply-To: <20181220212359.564-1-kjlu@umn.edu>

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

On Thu, 2018-12-20 at 15:23 -0600, Kangjie Lu wrote:
> When e1000_read_kmrn_reg_80003es2lan() fails, "kum_reg_data" is
> uninitialized and may contain random value. However, it is further
> used in the following execution, which will lead to undefined
> behaviors.
> The fix checks the failure of e1000_read_kmrn_reg_80003es2lan() and
> returns with its error code if it fails.
> 
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> ---
>  drivers/net/ethernet/intel/e1000e/80003es2lan.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

This is a good catch, although we do not want to exit out on failure.  I
have an alternative patch to resolve both issues, which I will submit later
today.  Just need to finish holiday shopping for my wife... :-)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2018-12-21 19:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 21:23 Kangjie Lu
2018-12-21 19:18 ` Jeff Kirsher [this message]

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=7478abbc4022a29414367cacdac1b89bff18c54c.camel@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pakki001@umn.edu \
    /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

all inboxes | Powered by JetHome®