[dpdk-stable] patch 'pci: fix check of mknod' has been queued to stable release 16.11.1

Yuanhan Liu yuanhan.liu at linux.intel.com
Mon Jan 23 08:46:37 CET 2017


Hi,

FYI, your patch has been queued to stable release 16.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 01/28/17.
So please shout if anyone has objections.

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From d8ae6e7afb2aca0dba8a94402d0d1f030c69666f Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai at intel.com>
Date: Thu, 17 Nov 2016 14:47:15 +0800
Subject: [PATCH] pci: fix check of mknod

[ upstream commit f1d54e6dfb1624d9c2d0a1b8a96eb4a84070b639 ]

In function pci_mknod_uio_dev() in lib/librte_eal/eal/eal_pci_uio.c,
The return value of mknod() is ret, not f got by fopen().
So the value of ret should be checked for mknod().

Fixes: f7f97c16048e ("pci: add option --create-uio-dev to run without hotplug")

Signed-off-by: Wei Dai <wei.dai at intel.com>
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
---
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
index 1786b75..3e4ffb5 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
@@ -133,7 +133,7 @@ pci_mknod_uio_dev(const char *sysfs_uio_path, unsigned uio_num)
 	snprintf(filename, sizeof(filename), "/dev/uio%u", uio_num);
 	dev = makedev(major, minor);
 	ret = mknod(filename, S_IFCHR | S_IRUSR | S_IWUSR, dev);
-	if (f == NULL) {
+	if (ret != 0) {
 		RTE_LOG(ERR, EAL, "%s(): mknod() failed %s\n",
 			__func__, strerror(errno));
 		return -1;
-- 
1.9.0



More information about the stable mailing list