Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify parent_dev before calling udev_device_get_sysattr_value #16717

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

Uglymotha
Copy link
Contributor

Fixes: #16705

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

Changes to be committed:
modified: cmd/zed/zed_disk_event.c

How Has This Been Tested?

Tested on a test vm

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, can you just address the style warning.

https://github.com/openzfs/zfs/actions/runs/11653449587/job/32445834792?pr=16717

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Nov 3, 2024
Fixes: openzfs#16705

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

Changes to be committed:
	modified:   cmd/zed/zed_disk_event.c

Signed-off-by: Sietse <[email protected]>
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Nov 4, 2024
@behlendorf behlendorf merged commit c8aed9f into openzfs:master Nov 5, 2024
20 checks passed
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Nov 5, 2024
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 <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Sietse <[email protected]>
Co-authored-by: Sietse <[email protected]>
Closes openzfs#16705 
Closes openzfs#16717
ixhamza pushed a commit to truenas/zfs that referenced this pull request Nov 11, 2024
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 <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Sietse <[email protected]>
Co-authored-by: Sietse <[email protected]>
Closes openzfs#16705 
Closes openzfs#16717
ptr1337 pushed a commit to CachyOS/zfs that referenced this pull request Nov 14, 2024
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 <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Sietse <[email protected]>
Co-authored-by: Sietse <[email protected]>
Closes openzfs#16705 
Closes openzfs#16717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zed aborts after assertion failure in udev_device_get_sysattr_value
3 participants