1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00
lvm2/libdm
Mikulas Patocka ed30145f4a libdm: fix races with udev
On modern systems udev manages nodes in /dev/mapper directory.
It creates, deletes and renames the nodes according to the
state of the kernel driver.

When the dmsetup is compiled without udev support (--enable-udev_sync)
and runs on the system with running udevd it tries to manage nodes in
/dev/mapper too, so it can race with udev.
dmsetup checks if the node was created/deleted/renamed with the stat
syscall, and skips the operation if it was. However, if udev
creates/deletes/renames the node after the stat syscall and before the
mknod/unlink/rename syscall, dmsetup reports an error.

Since in the system everything happened as expected, skip reporting
error for such case.

These races can be easily provoked by inserting sleep at appropriate
places.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2013-10-17 11:57:33 +02:00
..
datastruct Use void pointer instead of char for binary key 2011-03-10 12:48:40 +00:00
ioctl libdm: avoid leak if dm_task_set_* fn called again 2013-09-18 01:13:06 +01:00
misc ioctl: add DM_DATA_OUT_FLAG to dm-ioctl.h 2013-05-17 17:06:40 +01:00
mm libdm: Fix a data race in dm_pool_{create,destroy}. 2013-10-10 00:34:35 +02:00
regex cleanup: stack usage 2013-07-01 23:11:14 +02:00
.exported_symbols Generate liblvm2app and libdevmapper exported symbols from header files. 2010-06-25 18:17:38 +00:00
libdevmapper.h headers: use __linux__ instead of linux 2013-10-17 11:54:44 +02:00
libdevmapper.pc.in Switch to use Requires.private for devmapper.pc and lvm2app.pc 2010-05-11 08:54:11 +00:00
libdm-common.c libdm: fix races with udev 2013-10-17 11:57:33 +02:00
libdm-common.h libdm: introduce and use DEV_UUID macro 2012-10-10 17:16:15 +02:00
libdm-config.c cleanup: use simplier structure initialization 2013-06-16 00:07:33 +02:00
libdm-deptree.c Misc/RAID: Enable resume_lv to handle some renaming conflicts. 2013-09-09 15:07:28 -05:00
libdm-file.c Drop unreachable code 2012-02-08 12:59:45 +00:00
libdm-report.c cleanup: switch log_error to log_warn 2012-10-17 15:41:35 +02:00
libdm-string.c libdm: improve check in dm_split_lvm_name 2013-04-21 23:10:43 +02:00
Makefile.in libdm: Link to libpthread unconditionally. 2013-10-10 00:34:35 +02:00