SHA256
1
0
forked from pool/systemd
systemd/1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch
Robert Milasan 3595bbe8f8 Accepting request 236618 from home:rmilasan:branches:Base:System
- Add upstream patches
  1025-udev-exclude-device-mapper-from-block-device-ownersh.patch
  1026-udevd-inotify-modernizations.patch
  1027-udev-synthesize-change-events-for-partitions-when-to.patch
  1028-udev-link-config-fix-mem-leak.patch
  1029-udev-try-first-re-reading-the-partition-table.patch
  1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch
  1031-udev-make-sure-we-always-get-change-for-the-disk.patch
  1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch 

- Add upstream patches
  1025-udev-exclude-device-mapper-from-block-device-ownersh.patch
  1026-udevd-inotify-modernizations.patch
  1027-udev-synthesize-change-events-for-partitions-when-to.patch
  1028-udev-link-config-fix-mem-leak.patch
  1029-udev-try-first-re-reading-the-partition-table.patch
  1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch
  1031-udev-make-sure-we-always-get-change-for-the-disk.patch
  1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch

OBS-URL: https://build.opensuse.org/request/show/236618
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=662
2014-06-09 08:41:53 +00:00

24 lines
1.0 KiB
Diff

From 10fab50a3091e0b819c3ddab5a7c07acf750c050 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Wed, 4 Jun 2014 14:09:31 +0200
Subject: [PATCH] udev: guard REREADP logic with open(O_ECXL)
Signed-off-by: Robert Milasan <rmilasan@suse.com>
---
src/udev/udevd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: systemd-210/src/udev/udevd.c
===================================================================
--- systemd-210.orig/src/udev/udevd.c
+++ systemd-210/src/udev/udevd.c
@@ -757,7 +757,7 @@ static int synthesize_change(struct udev
* 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);