patch 'net/nbl: check ioctl returns' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 26 14:09:32 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.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/02/26. 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/af4b82e84dbec01ea0b687942607f20f92f5d29c

Thanks.

Kevin

---
>From af4b82e84dbec01ea0b687942607f20f92f5d29c Mon Sep 17 00:00:00 2001
From: Dimon Zhao <dimon.zhao at nebula-matrix.com>
Date: Tue, 3 Feb 2026 19:07:22 -0800
Subject: [PATCH] net/nbl: check ioctl returns

[ upstream commit 2e1c77833358db589fb014328ee0c5db1ae6c1ed ]

Check return values of ioctl() calls for NBL_DEV_USER_GET_BAR_SIZE
and NBL_DEV_USER_CLEAR_EVENTFD. The original code tested the return
value without capturing it from the ioctl call.

Coverity issue: 490947, 490951
Fixes: dc955cd24c8f ("net/nbl: add coexistence mode")

Signed-off-by: Dimon Zhao <dimon.zhao at nebula-matrix.com>
---
 drivers/net/nbl/nbl_common/nbl_userdev.c | 27 ++++++++++++++----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/drivers/net/nbl/nbl_common/nbl_userdev.c b/drivers/net/nbl/nbl_common/nbl_userdev.c
index 566f3a11ee..96f0d2e264 100644
--- a/drivers/net/nbl/nbl_common/nbl_userdev.c
+++ b/drivers/net/nbl/nbl_common/nbl_userdev.c
@@ -725,16 +725,18 @@ mmap:
 
 	common->eventfd = fd;
-	ioctl(common->devfd, NBL_DEV_USER_GET_BAR_SIZE, &bar_size);
-
-	if (!ret) {
-		pci_dev->mem_resource[0].addr = nbl_userdev_mmap(common->devfd, 0, bar_size);
-		pci_dev->mem_resource[0].phys_addr = 0;
-		pci_dev->mem_resource[0].len = bar_size;
-		pci_dev->mem_resource[2].addr = 0;
-
-		common->ifindex = nbl_userdev_get_ifindex(common->devfd);
-		common->nl_socket_route = nbl_userdev_nl_init(NETLINK_ROUTE);
+	ret = ioctl(common->devfd, NBL_DEV_USER_GET_BAR_SIZE, &bar_size);
+	if (ret) {
+		NBL_LOG(ERR, "nbl userdev get bar size failed");
+		goto close_eventfd;
 	}
 
+	pci_dev->mem_resource[0].addr = nbl_userdev_mmap(common->devfd, 0, bar_size);
+	pci_dev->mem_resource[0].phys_addr = 0;
+	pci_dev->mem_resource[0].len = bar_size;
+	pci_dev->mem_resource[2].addr = 0;
+
+	common->ifindex = nbl_userdev_get_ifindex(common->devfd);
+	common->nl_socket_route = nbl_userdev_nl_init(NETLINK_ROUTE);
+
 	return ret;
 
@@ -754,4 +756,5 @@ void nbl_pci_unmap_device(struct nbl_adapter *adapter)
 	struct rte_pci_device *pci_dev = adapter->pci_dev;
 	struct nbl_common_info *common = &adapter->common;
+	int ret;
 
 	if (NBL_IS_NOT_COEXISTENCE(common))
@@ -759,5 +762,7 @@ void nbl_pci_unmap_device(struct nbl_adapter *adapter)
 
 	rte_mem_unmap(pci_dev->mem_resource[0].addr, pci_dev->mem_resource[0].len);
-	ioctl(common->devfd, NBL_DEV_USER_CLEAR_EVENTFD, 0);
+	ret = ioctl(common->devfd, NBL_DEV_USER_CLEAR_EVENTFD, 0);
+	if (ret)
+		NBL_LOG(ERR, "nbl userdev set clear eventfd failed, ret: %d", ret);
 	close(common->eventfd);
 	close(common->nl_socket_route);
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-02-26 10:16:50.608930864 +0000
+++ 0090-net-nbl-check-ioctl-returns.patch	2026-02-26 10:16:47.035244178 +0000
@@ -1 +1 @@
-From 2e1c77833358db589fb014328ee0c5db1ae6c1ed Mon Sep 17 00:00:00 2001
+From af4b82e84dbec01ea0b687942607f20f92f5d29c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e1c77833358db589fb014328ee0c5db1ae6c1ed ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list