[systemd-commits] src/udev

Kay Sievers kay at kemper.freedesktop.org
Wed Jun 4 05:11:04 PDT 2014


 src/udev/udevd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 10fab50a3091e0b819c3ddab5a7c07acf750c050
Author: Kay Sievers <kay at vrfy.org>
Date:   Wed Jun 4 14:09:31 2014 +0200

    udev: guard REREADP logic with open(O_ECXL)

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 763062f..d79891a 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);



More information about the systemd-commits mailing list