Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742731

Re: [PATCH] net: hns3: fix null pointer dereference before null check

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] net: hns3: fix null pointer dereference before null check
Date 2017-10-01 05:20 +0200
Message-ID <uvCXn-4YV-3@gated-at.bofh.it> (permalink)
References <uv9C1-28R-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] net: hns3: fix null pointer dereference before null check Colin King <colin.king@canonical.com> - 2017-09-29 22:00 +0200
  Re: [PATCH] net: hns3: fix null pointer dereference before null check Yunsheng Lin <linyunsheng@huawei.com> - 2017-09-30 02:50 +0200
  Re: [PATCH] net: hns3: fix null pointer dereference before null  check David Miller <davem@davemloft.net> - 2017-10-01 05:20 +0200

csiph-web