diff mbox series

[whinlatter,15/18] xserver-nodm-init: avoid race condition related to udev

Message ID c455cbbbc2b268562c2592f60cbdc8e5606056b2.1766352840.git.steve@sakoman.com
State New
Headers show
Series [whinlatter,01/18] binutils: Fix CVE-2025-11494 | expand

Commit Message

Steve Sakoman Dec. 21, 2025, 9:37 p.m. UTC
From: Chen Qi <Qi.Chen@windriver.com>

With systemd upgraded to 258+, there's a race condition error found
on qemuarm:

  failed to find screen to remove

This error is likely to be introduced by the following systemd commit:
https://github.com/systemd/systemd/commit/0ba9d06963ecb848e71951ed5e9f6f6f03b80b06

However, I think the commit cannot be reverted, not only because
there are a bunch of changes based on this one, but also because
the change look like a reasonable one.

Before xserver is able to handle such issue inside its codes, this service
need wait for udev to settle things before it starts. This can avoid the
above race condition error.

Fixes [YOCTO #16045]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 213dd5a0b786047cd4de0f51b4b49c9b8b628709)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 .../x11-common/xserver-nodm-init/xserver-nodm.service.in        | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
index 87dc4f8fcd..43aaa84c0f 100644
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
@@ -1,5 +1,7 @@ 
 [Unit]
 Description=Xserver startup without a display manager
+After=systemd-udev-settle.service
+Wants=systemd-udev-settle.service
 
 [Service]
 EnvironmentFile=/etc/default/xserver-nodm