lkml.org 
[lkml]   [2018]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] net: 80003es2lan: fix a missing check of read failure
From
Date
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... :-)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-12-21 20:19    [W:0.208 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site