From 58df64ad20a22f7c28bfa18e3a0384ff157bee7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 4 Jul 2014 03:29:38 +0200 Subject: [PATCH] udev: skip empty device-mapper nodes It can happen during device reconfiguration - do not decide to expose the device until its known what device it will be. This fixes bug where root.img was visible in qvm-block as normal device and could be detached. --- udev/udev-qubes-block.rules | 1 + 1 file changed, 1 insertion(+) diff --git a/udev/udev-qubes-block.rules b/udev/udev-qubes-block.rules index 77ea1ae..9fc0cbd 100644 --- a/udev/udev-qubes-block.rules +++ b/udev/udev-qubes-block.rules @@ -12,6 +12,7 @@ ENV{MAJOR}=="202", GOTO="qubes_block_end" # Skip device-mapper devices ENV{MAJOR}=="253", ENV{DM_NAME}=="snapshot-*", GOTO="qubes_block_end" +ENV{MAJOR}=="253", ENV{DM_NAME}=="", GOTO="qubes_block_end" IMPORT{db}="QUBES_EXPOSED" ACTION=="add", IMPORT{program}="/usr/bin/flock /var/run/qubes-udev.lock -c /usr/libexec/qubes/udev-block-add-change"