From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Bowers, AndrewX" Subject: RE: [Intel-wired-lan] [PATCH][-next] ixgbe: don't clear_bit on xdp_ring->state if xdp_ring is null Date: Mon, 8 Oct 2018 18:38:44 +0000 Message-ID: <26D9FDECA4FBDD4AADA65D8E2FC68A4A1D2FD5EB@ORSMSX106.amr.corp.intel.com> References: <20181004175732.28329-1-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT To: "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" Return-path: Received: from mga12.intel.com ([192.55.52.136]:7783 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729280AbeJIBvt (ORCPT ); Mon, 8 Oct 2018 21:51:49 -0400 In-Reply-To: <20181004175732.28329-1-colin.king@canonical.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: > -----Original Message----- > From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On > Behalf Of Colin King > Sent: Thursday, October 4, 2018 10:58 AM > To: Kirsher, Jeffrey T ; David S . Miller > ; intel-wired-lan@lists.osuosl.org; > netdev@vger.kernel.org > Cc: kernel-janitors@vger.kernel.org > Subject: [Intel-wired-lan] [PATCH][-next] ixgbe: don't clear_bit on xdp_ring- > >state if xdp_ring is null > > From: Colin Ian King > > There is an earlier check to see if xdp_ring is null when configuring the tx ring, > so assuming that it can still be null, the clearing of the xdp_ring->state > currently could end up with a null pointer dereference. Fix this by only > clearing the bit if xdp_ring is not null. > > Detected by CoverityScan, CID#1473795 ("Dereference after null check") > > Fixes: 024aa5800f32 ("ixgbe: added Rx/Tx ring disable/enable functions") > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Tested-by: Andrew Bowers From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bowers, AndrewX Date: Mon, 8 Oct 2018 18:38:44 +0000 Subject: [Intel-wired-lan] [PATCH][-next] ixgbe: don't clear_bit on xdp_ring->state if xdp_ring is null In-Reply-To: <20181004175732.28329-1-colin.king@canonical.com> References: <20181004175732.28329-1-colin.king@canonical.com> Message-ID: <26D9FDECA4FBDD4AADA65D8E2FC68A4A1D2FD5EB@ORSMSX106.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: > -----Original Message----- > From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On > Behalf Of Colin King > Sent: Thursday, October 4, 2018 10:58 AM > To: Kirsher, Jeffrey T ; David S . Miller > ; intel-wired-lan at lists.osuosl.org; > netdev at vger.kernel.org > Cc: kernel-janitors at vger.kernel.org > Subject: [Intel-wired-lan] [PATCH][-next] ixgbe: don't clear_bit on xdp_ring- > >state if xdp_ring is null > > From: Colin Ian King > > There is an earlier check to see if xdp_ring is null when configuring the tx ring, > so assuming that it can still be null, the clearing of the xdp_ring->state > currently could end up with a null pointer dereference. Fix this by only > clearing the bit if xdp_ring is not null. > > Detected by CoverityScan, CID#1473795 ("Dereference after null check") > > Fixes: 024aa5800f32 ("ixgbe: added Rx/Tx ring disable/enable functions") > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Tested-by: Andrew Bowers