Prevent the creation of a new DASD node object when the device does not
exist.
Resolves:
https://issues.redhat.com/browse/RHEL-39497
Reviewed-by: Marc Hartmayer <mhartmay(a)linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
---
src/node_device/node_device_udev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index c0e258fe9c..ad994ef0b2 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -958,6 +958,9 @@ udevProcessDASD(struct udev_device *device,
udevGetStringSysfsAttr(device, "device/uid", &storage->serial);
+ if (!storage->serial)
+ return -1;
+
return udevProcessDisk(device, def);
}
--
2.45.0