]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev: serialize queued events on exit (#37047)
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 22 Apr 2025 08:54:25 +0000 (10:54 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Apr 2025 08:54:25 +0000 (10:54 +0200)
commit505492d61c36985f72fee1952a7fe397b3193a6a
treee458daf10e41fce93219a9872446a266ee9fc4c2
parent97d5cf46d848507e5ec5f463f3a3443c966b85cd
parenta4f003bac07b5ed35243df1a7679f92286ba18ee
udev: serialize queued events on exit (#37047)

Previously, all queued events were discarded on exit, hence several
events might not be processed by udevd when it is restarted. Such
situation especially easily happens on switching root.

This makes queued events serialized on exit, and deserialized in the
next invocation. Hence, no events should be lost during restarting
udevd.

This is important with the several aspects. Basically
systemd-udev-trigger.service (re)triggers all devices anyway after
switching root, But the service may be disabled or modified by admin.
Moreover, the service produces only 'add' events, and thus the service
cannot cover events with other actions generated by the kernel during
switching root. Also, the userspace triggered events may not contain
some parameters compared with events triggered by the kernel.