When hotplugging a /dev device that already exists in the process namespace we reset all the permissions, labels etc. to the same state as the parent namespace. Then, when we are trying to label the device for qemu we find out there are label-remembering attributes with a positive reference count and because we are trying to set a different label (the device now has the label of the original device from the parent namespace) we refuse to reset it. Not only the hotplug fails (purposefully not questioning the usability of hotplugging the same device for a second time) but it also resets the labels to something we do not want. Now the quiestion is: What does this patchset do? You can have a guess. Martin Kletzander (3): qemu_namespace: Rename variable qemu_namespace: Properly report new files qemu_namespace: Only replicate labels on created files src/qemu/qemu_namespace.c | 64 +++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 30 deletions(-) -- 2.47.0