]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev: remember UUIDs of triggered events
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 30 Jan 2026 15:47:31 +0000 (00:47 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 3 Feb 2026 12:25:01 +0000 (21:25 +0900)
commitb7363d33302fa86fe46e03b500e729fea3277ed7
tree7bb6638fc9d7ab800dfe94a01ed91a4d79133a59
parent95b40e4cf31ce38d36010526403c1bdb27788d7e
udev: remember UUIDs of triggered events

Otherwise, /run/udev/queue file may be removed before udevd receives
the triggered uevents. This avoids the following race:

1. uevent A is being processed,
2. received an inotify event and trigger a synthesized uevent,
3. uevent A has been processed,
4. the uevent queue becomes empty, and /run/udev/queue is removed,
5. received and queued the synthesized uevent, and /run/udev/queue is recreated.

With this patch, /run/udev/queue is not removed in step 4. Hence,
'udevadm settle' will wait for the synthesized event being processed.

This is similar to waiting for child processes that reread partitions
(thus trigger synthetic events) being terminated, but for synthetic
events triggered by the manager.
src/udev/udev-manager.c
src/udev/udev-manager.h
src/udev/udev-watch.c