From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 59491A00E6 for ; Thu, 21 Mar 2019 13:29:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 538EC1B4A9; Thu, 21 Mar 2019 13:29:27 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 39FFC1B4A9 for ; Thu, 21 Mar 2019 13:29:26 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A2DD258E51; Thu, 21 Mar 2019 12:29:25 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-76.ams2.redhat.com [10.36.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3ED960BE5; Thu, 21 Mar 2019 12:29:24 +0000 (UTC) From: Kevin Traynor To: Shahed Shaikh Cc: dpdk stable Date: Thu, 21 Mar 2019 12:29:02 +0000 Message-Id: <20190321122903.668-4-ktraynor@redhat.com> In-Reply-To: <20190321122903.668-1-ktraynor@redhat.com> References: <20190321122903.668-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 21 Mar 2019 12:29:25 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bnx2x: fix segfaults due to stale interrupt status' has been queued to LTS release 18.11.1 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/22/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 rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Kevin Traynor --- >From a501c1da5819c8d5a8c164141cf301ca96312adf Mon Sep 17 00:00:00 2001 From: Shahed Shaikh Date: Thu, 21 Feb 2019 11:24:44 -0800 Subject: [PATCH] net/bnx2x: fix segfaults due to stale interrupt status [ upstream commit 797ed9916ac73efc8f3d0b1a9a354d50948566c9 ] Previous ungraceful exit may leave behind un-acked stale interrupts for slowpath and fastpath. Interrupt status polling function is started before FLR is initiated, so we don't have a real way to protect this polling function invoking an interrupt handler caused due to stale interrupt status from previous ungraceful exit. So, check uninitialized status block variables in interrupt handling path which may lead to segfault. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Shahed Shaikh --- drivers/net/bnx2x/bnx2x.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 4c775c163..26b3828e8 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -4202,4 +4202,7 @@ static uint16_t bnx2x_update_dsb_idx(struct bnx2x_softc *sc) uint16_t rc = 0; + if (!def_sb) + return 0; + mb(); /* status block is written to by the chip */ @@ -4526,4 +4529,8 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp, int scan_fp) uint8_t more_rx = FALSE; + /* Make sure FP is initialized */ + if (!fp->sb_running_index) + return; + PMD_DEBUG_PERIODIC_LOG(DEBUG, sc, "---> FP TASK QUEUE (%d) <--", fp->index); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-03-21 11:21:26.491739104 +0000 +++ 0004-net-bnx2x-fix-segfaults-due-to-stale-interrupt-statu.patch 2019-03-21 11:21:26.301140731 +0000 @@ -1,8 +1,10 @@ -From 797ed9916ac73efc8f3d0b1a9a354d50948566c9 Mon Sep 17 00:00:00 2001 +From a501c1da5819c8d5a8c164141cf301ca96312adf Mon Sep 17 00:00:00 2001 From: Shahed Shaikh Date: Thu, 21 Feb 2019 11:24:44 -0800 Subject: [PATCH] net/bnx2x: fix segfaults due to stale interrupt status +[ upstream commit 797ed9916ac73efc8f3d0b1a9a354d50948566c9 ] + Previous ungraceful exit may leave behind un-acked stale interrupts for slowpath and fastpath. @@ -15,7 +17,6 @@ handling path which may lead to segfault. Fixes: 540a211084a7 ("bnx2x: driver core") -Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh ---