[dpdk-stable] patch 'net/bnx2x: fix segfaults due to stale interrupt status' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Thu Mar 21 13:29:02 CET 2019


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 <shshaikh at marvell.com>
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 <shshaikh at marvell.com>
---
 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 <shshaikh at marvell.com>
 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 at dpdk.org
 
 Signed-off-by: Shahed Shaikh <shshaikh at marvell.com>
 ---


More information about the stable mailing list