teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0395-units-remove-udev-control-socket-when-systemd-stops-.patch

803fb7
From f77d58374ccd2e3d9c886e59020f1b32e97f2bdc Mon Sep 17 00:00:00 2001
803fb7
From: Michal Sekletar <msekletar@users.noreply.github.com>
803fb7
Date: Mon, 29 Aug 2016 14:49:20 +0200
803fb7
Subject: [PATCH] units: remove udev control socket when systemd stops the
803fb7
 socket unit (#49)
803fb7
803fb7
Mere presence of the socket in the filesystem makes
803fb7
udev_queue_get_udev_is_active() return that udev is running. Note that,
803fb7
udev on exit doesn't unlink control socket nor does systemd. Thus socket
803fb7
stays around even when both daemon and socket are stopped. This causes
803fb7
problems for cryptsetup because when it detects running udev it launches
803fb7
synchronous operations that *really* require udev. This in turn may
803fb7
cause blocking and subsequent timeout in systemd-cryptsetup on reboot
803fb7
while machine is in a state that udev and its control socket units are
803fb7
stopped, e.g. emergency mode.
803fb7
803fb7
Fixes #2477
803fb7
803fb7
Cherry-picked from: a2de10775194edec51b1e88d20a380724a3dc716
803fb7
Resolves: #1370133
803fb7
---
803fb7
 units/systemd-udevd-control.socket | 1 +
803fb7
 1 file changed, 1 insertion(+)
803fb7
803fb7
diff --git a/units/systemd-udevd-control.socket b/units/systemd-udevd-control.socket
803fb7
index 8330a1c03..46f704ed7 100644
803fb7
--- a/units/systemd-udevd-control.socket
803fb7
+++ b/units/systemd-udevd-control.socket
803fb7
@@ -17,3 +17,4 @@ Service=systemd-udevd.service
803fb7
 ListenSequentialPacket=/run/udev/control
803fb7
 SocketMode=0600
803fb7
 PassCredentials=yes
803fb7
+RemoveOnStop=yes