]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevd: always block follwoing events with same devpath
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 29 Jan 2019 12:55:27 +0000 (13:55 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 29 Jan 2019 13:04:43 +0000 (14:04 +0100)
Originally commented as "devices names might have changed/swapped in the meantime",
but may not. For safety, let's block the following events with same
devpath.

This may fix #6514.

src/udev/udevd.c

index 488a980742a72d007cf574d221b9ccc46a206600..79191ffaf1b0e62f309de238404083ae54433007 100644 (file)
@@ -756,12 +756,8 @@ static int is_device_busy(Manager *manager, struct event *event) {
                         continue;
 
                 /* identical device event found */
-                if (devpath_len == loop_devpath_len) {
-                        /* devices names might have changed/swapped in the meantime */
-                        if (major(devnum) != 0 || ifindex > 0)
-                                continue;
+                if (devpath_len == loop_devpath_len)
                         goto set_delaying_seqnum;
-                }
 
                 /* parent device event found */
                 if (devpath[common] == '/')