Commit 3a2dec17 authored by Chris Wilson's avatar Chris Wilson 🤔
Browse files

sna: Repeat udev_monitor_get_device() if interrupted

In case udev_monitor_get_device() itself does not handle being
interrupted, go around the loop again. Daniel Vetter discovered this
interesting quirk during igt testing of kms_leases.
Signed-off-by: Chris Wilson's avatarChris Wilson <>
parent 33ee0c3b
......@@ -802,9 +802,14 @@ sna_handle_uevents(int fd, void *closure)
struct udev_device *dev;
dev_t devnum;
errno = 0;
dev = udev_monitor_receive_device(sna->uevent_monitor);
if (dev == NULL)
if (dev == NULL) {
if (errno == EINTR || errno == EAGAIN)
devnum = udev_device_get_devnum(dev);
if (memcmp(&s.st_rdev, &devnum, sizeof(dev_t)) == 0) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment