]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/loop-util.c
loop-util: read kernel's uevent seqnum right before attaching a loopback device
authorLennart Poettering <lennart@poettering.net>
Tue, 20 Apr 2021 08:56:38 +0000 (10:56 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Apr 2021 15:13:56 +0000 (17:13 +0200)
commit31c75fcc415056e7ded80136547fd4658fa554f7
treed627f630f2d8a68f3bd99ce1f288ee290bc33856
parent79e8393a6acb0115c6b8995db6ddbf4215d0851c
loop-util: read kernel's uevent seqnum right before attaching a loopback device

Later, this will allow us to ignore uevents from earlier attachments a
bit better, as we can compare uevent seqnums with this boundary. It's
not a full fix for the race though, since we cannot atomically determine
the uevent and attach the device, but it at least shortens the window a
bit.
src/shared/loop-util.c
src/shared/loop-util.h