patch 'net/bnx2x: fix always true expression' has been queued to stable release 21.11.9
Kevin Traynor
ktraynor at redhat.com
Wed Nov 27 18:18:49 CET 2024
Hi,
FYI, your patch has been queued to stable release 21.11.9
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/02/24. 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.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e727bfdcf18ce2b526165ad9c43d42be40891505
Thanks.
Kevin
---
>From e727bfdcf18ce2b526165ad9c43d42be40891505 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 12 Nov 2024 09:43:54 -0800
Subject: [PATCH] net/bnx2x: fix always true expression
[ upstream commit fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 ]
Coverity spotted that the check to enable single interrupt
mode would evaluate as always true since:
The or condition sc->interrupt_mode != 2 || sc->interrupt_mode != 3
will always be true because sc->interrupt_mode cannot be equal to
two different values at the same time, so it must be not equal to
at least one of them.
Coverity issue: 362046
Fixes: 540a211084a7 ("bnx2x: driver core")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/net/bnx2x/bnx2x.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 55a91fad78..8e6d2c5c80 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -11196,9 +11196,7 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc)
* INT#x or MSI
*/
- if ((sc->interrupt_mode != INTR_MODE_MSIX)
- || (sc->interrupt_mode != INTR_MODE_SINGLE_MSIX)) {
+ if (sc->interrupt_mode == INTR_MODE_INTX ||
+ sc->interrupt_mode == INTR_MODE_MSI)
pf_conf |= IGU_PF_CONF_SINGLE_ISR_EN;
- }
-
/*
* Timers workaround bug: function init part.
--
2.47.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-11-27 17:17:41.463522376 +0000
+++ 0102-net-bnx2x-fix-always-true-expression.patch 2024-11-27 17:17:38.319269860 +0000
@@ -1 +1 @@
-From fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 Mon Sep 17 00:00:00 2001
+From e727bfdcf18ce2b526165ad9c43d42be40891505 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 3153cc4d80..af31ac4604 100644
+index 55a91fad78..8e6d2c5c80 100644
@@ -27 +28 @@
-@@ -11190,9 +11190,7 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc)
+@@ -11196,9 +11196,7 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc)
More information about the stable
mailing list