mirror of
https://github.com/systemd/systemd.git
synced 2024-12-28 11:21:59 +03:00
udev: guard REREADP logic with open(O_ECXL)
This commit is contained in:
parent
ede344452a
commit
10fab50a30
@ -754,7 +754,7 @@ static int synthesize_change(struct udev_device *dev) {
|
|||||||
* The kernel will send out a change event for the disk, and
|
* The kernel will send out a change event for the disk, and
|
||||||
* "remove/add" for all partitions.
|
* "remove/add" for all partitions.
|
||||||
*/
|
*/
|
||||||
fd = open(udev_device_get_devnode(dev), O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK);
|
fd = open(udev_device_get_devnode(dev), O_RDONLY|O_EXCL|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK);
|
||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
r = ioctl(fd, BLKRRPART, 0);
|
r = ioctl(fd, BLKRRPART, 0);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
Loading…
Reference in New Issue
Block a user