2 Star 0 Fork 91

yangshicheng / systemd

forked from src-openEuler / systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-udev-assume-there-is-no-blocker-when-failed-to-check-event.patch 2.28 KB
一键复制 编辑 原始数据 按行查看 历史
From 2d40f02ee4317233365f53c85234be3af6b000a6 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Sat, 12 Mar 2022 20:57:15 +0900
Subject: [PATCH] udev: assume there is no blocker when failed to check event
dependencies
Previously, if udevd failed to resolve event dependency, the event is
ignored and libudev listeners did not receive the event. This is
inconsistent with the case when a worker failed to process a event,
in that case, the original uevent sent by the kernel is broadcasted to
listeners.
Reference:https://github.com/systemd/systemd/commit/2d40f02ee4317233365f53c85234be3af6b000a6
Conflict:NA
---
src/udev/udevd.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index f1f864a4610c..8c690357b8d3 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -951,24 +951,21 @@ static int event_queue_start(Manager *manager) {
/* do not start event if parent or child event is still running or queued */
r = event_is_blocked(event);
+ if (r > 0)
+ continue;
if (r < 0) {
sd_device_action_t a = _SD_DEVICE_ACTION_INVALID;
(void) sd_device_get_action(event->dev, &a);
log_device_warning_errno(event->dev, r,
- "Failed to check event dependency, "
- "skipping event (SEQNUM=%"PRIu64", ACTION=%s)",
+ "Failed to check dependencies for event (SEQNUM=%"PRIu64", ACTION=%s), "
+ "assuming there is no blocking event, ignoring: %m",
event->seqnum,
strna(device_action_to_string(a)));
-
- event_free(event);
- return r;
}
- if (r > 0)
- continue;
r = event_run(event);
- if (r <= 0)
+ if (r <= 0) /* 0 means there are no idle workers. Let's escape from the loop. */
return r;
}
1
https://gitee.com/yangshicheng/systemd.git
git@gitee.com:yangshicheng/systemd.git
yangshicheng
systemd
systemd
master

搜索帮助