systemd/SOURCES/0180-udev-make-get_virtfn_info-provide-physical-PCI-devic.patch

30 lines
1.1 KiB
Diff
Raw Permalink Normal View History

2023-05-09 05:39:14 +00:00
From fe2d716926d6b800be8775251826453b9a2808da Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Wed, 1 Feb 2023 23:39:43 +0900
Subject: [PATCH] udev: make get_virtfn_info() provide physical PCI device
Fixes a bug introduced by 78463c6c4fdcb703bc0dc694c3ea77df3c5624e0.
Fixes #25545.
(cherry picked from commit cf74e2e16fb06b7de9e3875c6462290998fb06bd)
Resolves: #2159448
---
src/udev/udev-builtin-net_id.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index 7504123700..d4e9dcb60d 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -144,7 +144,7 @@ static int get_virtfn_info(sd_device *pcidev, sd_device **ret_physfn_pcidev, cha
if (!suffix)
return -ENOMEM;
- *ret_physfn_pcidev = sd_device_ref(child);
+ *ret_physfn_pcidev = sd_device_ref(physfn_pcidev);
*ret_suffix = suffix;
return 0;
}