diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-04-20 15:57:29 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-04-20 17:14:10 +0200 |
commit | 75dc190d39bb71428ab0a0e6185af42aef9451a1 (patch) | |
tree | 24953f8c3a287cea4f809e32819449eceb97726e /src/gpt-auto-generator | |
parent | 31c75fcc415056e7ded80136547fd4658fa554f7 (diff) | |
download | systemd-75dc190d39bb71428ab0a0e6185af42aef9451a1.tar.gz |
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.
Diffstat (limited to 'src/gpt-auto-generator')
-rw-r--r-- | src/gpt-auto-generator/gpt-auto-generator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index 42549a2cd8..eb80165bbe 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -672,6 +672,7 @@ static int enumerate_partitions(dev_t devnum) { r = dissect_image( fd, NULL, NULL, + UINT64_MAX, DISSECT_IMAGE_GPT_ONLY| DISSECT_IMAGE_NO_UDEV| DISSECT_IMAGE_USR_NO_ROOT, |