]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/discover-image.c
dissect: ignore old uevents when waiting for loopback partition scan
authorLennart Poettering <lennart@poettering.net>
Tue, 20 Apr 2021 13:57:29 +0000 (15:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Apr 2021 15:14:10 +0000 (17:14 +0200)
commit75dc190d39bb71428ab0a0e6185af42aef9451a1
tree24953f8c3a287cea4f809e32819449eceb97726e
parent31c75fcc415056e7ded80136547fd4658fa554f7
dissect: ignore old uevents when waiting for loopback partition scan

Let's drop all monitor uevent that were enqueued before we actually
started setting up the device.

This doesn't fix the race, but it makes the race window smaller: since
we cannot determine the uevent seqnum and the loopback attachment
atomically, there's a tiny window where uevents might be generated by
the device which we mistake for being associated with out use of the
loopback device.
src/core/namespace.c
src/dissect/dissect.c
src/gpt-auto-generator/gpt-auto-generator.c
src/nspawn/nspawn.c
src/portable/portable.c
src/shared/discover-image.c
src/shared/dissect-image.c
src/shared/dissect-image.h
src/sysext/sysext.c
src/test/test-loop-block.c