From 1fc745cac263f2f0d3fab877a276b8f9afa6b6f7 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 4 Jun 2014 14:09:31 +0200 Subject: udev: guard REREADP logic with open(O_ECXL) Signed-off-by: Anthony G. Basile --- src/udev/udevd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udev/udevd.c b/src/udev/udevd.c index d598ba39e3..ea51b09b61 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -754,7 +754,7 @@ static int synthesize_change(struct udev_device *dev) { * The kernel will send out a change event for the disk, and * "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) { r = ioctl(fd, BLKRRPART, 0); close(fd); -- cgit v1.2.3-54-g00ecf