lkml.org 
[lkml]   [2017]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: hns3: fix null pointer dereference before null check
From
From: Colin King <colin.king@canonical.com>
Date: Fri, 29 Sep 2017 20:51:23 +0100

> From: Colin Ian King <colin.king@canonical.com>
>
> pointer ndev is being dereferenced with the call to netif_running
> before it is being null checked. Re-order the code to only dereference
> ndev after it has been null checked.
>
> Detected by CoverityScan, CID#1457206 ("Dereference before null check")
>
> Fixes: 9df8f79a4d29 ("net: hns3: Add DCB support when interacting with network stack")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

\
 
 \ /
  Last update: 2017-10-01 05:14    [W:0.025 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site