lkml.org 
[lkml]   [2017]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] netvsc: fix dereference before null check errors
Date


> -----Original Message-----
> From: Colin King [mailto:colin.king@canonical.com]
> Sent: Saturday, March 25, 2017 10:27 AM
> To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>;
> devel@linuxdriverproject.org; netdev@vger.kernel.org
> Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] netvsc: fix dereference before null check errors
>
> From: Colin Ian King <colin.king@canonical.com>
>
> ndev is being checked to see if it is a null pointer however before
> the null check ndev is being dereferenced; hence there is a potential
> null pointer dereference bug that needs fixing. Fix this by only
> dereferencing ndev after the null check.
>
> Detected by CoverityScan, CID#1420760, CID#140761 ("Dereference
> before null check")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>

Thank you!
\
 
 \ /
  Last update: 2017-03-27 02:51    [W:0.048 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site