Verify parent_dev before calling udev_device_get_sysattr_value
commitc8aed9f97329bb328ea4fe677defdcb20d703bb3
authorUglymotha <uglymotha@wizdom.nu>
Tue, 5 Nov 2024 00:44:38 +0000 (5 01:44 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Nov 2024 00:44:38 +0000 (4 16:44 -0800)
treee0cd7a4e4d1caaa39472999d6d5b6b659c524453
parentb16e096198ba9e530c9fd3a955cde66b6a5efc8e
Verify parent_dev before calling udev_device_get_sysattr_value

Not all udev devices have parent devices.
Calling udev_device_get_ functions yield an assertion error
if called with a NULL pointer.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Sietse <sietse@wizdom.nu>
Co-authored-by: Sietse <sietse@wizdom.nu>
Closes #16705
Closes #16717
cmd/zed/zed_disk_event.c