summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-06-04 14:09:31 +0200
committerAnthony G. Basile <blueness@gentoo.org>2014-06-07 08:43:13 -0400
commit1fc745cac263f2f0d3fab877a276b8f9afa6b6f7 (patch)
tree4ded1dc7b23fa5555ae29eef24e73a320b1cc7d7 /src/udev/udevd.c
parent8a892f61097f90cf06cc33ab0510cd4ecbf64e11 (diff)
udev: guard REREADP logic with open(O_ECXL)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r--src/udev/udevd.c2
1 files changed, 1 insertions, 1 deletions
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);