From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D13EAA04F5 for ; Wed, 11 Dec 2019 22:28:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C8CA41B994; Wed, 11 Dec 2019 22:28:45 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id B55361B994 for ; Wed, 11 Dec 2019 22:28:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MbgK9a2DfvMuQk2AW95RnfUxvVHpDRmz8B//7yf+5JI=; b=ZEFTYEJbe9xdnHEfYm6SKQqhra40xla0/F/NUObMQnlYpPSwzC4YXQS3I6dbXxqN6vdPG6 0LMCZE5DwAaj7d6xGN3cI1R2ZAUQF59L2JNxa2Yki+0m/SMmrNYrrP+fBJPtbWI5uE31nt oC0osxUGXZIvSgUHbTlfXV+IHbwiVIE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-319-hCIcqIsOOyyrdtTdM0CGBw-1; Wed, 11 Dec 2019 16:28:40 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E4E65107ACC5; Wed, 11 Dec 2019 21:28:38 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 044A410013A1; Wed, 11 Dec 2019 21:28:37 +0000 (UTC) From: Kevin Traynor To: Ajit Khaparde Cc: Andy Gospodarek , dpdk stable Date: Wed, 11 Dec 2019 21:26:30 +0000 Message-Id: <20191211212702.27851-38-ktraynor@redhat.com> In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com> References: <20191211212702.27851-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: hCIcqIsOOyyrdtTdM0CGBw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/bnxt: fix crash in xstats get' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/17/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/48d9b60c0ad1c25e0c= 36b7bfc4075580b10bc88d Thanks. Kevin. --- >From 48d9b60c0ad1c25e0c36b7bfc4075580b10bc88d Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Wed, 13 Nov 2019 13:59:43 +0530 Subject: [PATCH] net/bnxt: fix crash in xstats get [ upstream commit 063e59ddd28e3a147107366ddba9fb8baeeebc31 ] We would hit a segfault in bnxt_dev_xstats_get_op() if xstats argument is NULL, Check if the argument is NULL and return appropriately. Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset") Signed-off-by: Ajit Khaparde Reviewed-by: Andy Gospodarek --- drivers/net/bnxt/bnxt_stats.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c index ad88fbfe7..252a0a6fc 100644 --- a/drivers/net/bnxt/bnxt_stats.c +++ b/drivers/net/bnxt/bnxt_stats.c @@ -454,4 +454,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev, =09unsigned int stat_count; =20 +=09if (xstats =3D=3D NULL) +=09=09return 0; + =09memset(xstats, 0, sizeof(*xstats)); =20 --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-11 21:24:15.711237173 +0000 +++ 0038-net-bnxt-fix-crash-in-xstats-get.patch=092019-12-11 21:24:12.67365= 1093 +0000 @@ -1 +1 @@ -From 063e59ddd28e3a147107366ddba9fb8baeeebc31 Mon Sep 17 00:00:00 2001 +From 48d9b60c0ad1c25e0c36b7bfc4075580b10bc88d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 063e59ddd28e3a147107366ddba9fb8baeeebc31 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 40b496ac0..14d355fd0 100644 +index ad88fbfe7..252a0a6fc 100644 @@ -22,2 +23,2 @@ -@@ -469,4 +469,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev= , - =09=09return rc; +@@ -454,4 +454,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev= , + =09unsigned int stat_count;