Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Rings:1-MinimalX
systemd
1032-udev-guard-REREADPT-by-exclusive-lock-inst...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch of Package systemd
From 02ba8fb3357daf57f6120ac512fb464a4c623419 Mon Sep 17 00:00:00 2001 From: Kay Sievers <kay@vrfy.org> Date: Wed, 4 Jun 2014 16:21:19 +0200 Subject: [PATCH] udev: guard REREADPT by exclusive lock instead of O_EXCL Signed-off-by: Robert Milasan <rmilasan@suse.com> --- src/udev/udevd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Index: systemd-210/src/udev/udevd.c =================================================================== --- systemd-210.orig/src/udev/udevd.c +++ systemd-210/src/udev/udevd.c @@ -758,9 +758,12 @@ static int synthesize_change(struct udev * partition table is found, and we will not get an event for * the disk. */ - fd = open(udev_device_get_devnode(dev), O_RDONLY|O_EXCL|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); + fd = open(udev_device_get_devnode(dev), O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); if (fd >= 0) { - r = ioctl(fd, BLKRRPART, 0); + r = flock(fd, LOCK_EX|LOCK_NB); + if (r >= 0) + r = ioctl(fd, BLKRRPART, 0); + close(fd); if (r >= 0) part_table_read = true;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor