summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
new file mode 100644
index 0000000000..3ff0177ae3
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
@@ -0,0 +1,41 @@
1From 25093c5017725b8577c444dfea0f42ad85b43522 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 4 Jul 2018 15:00:44 +0800
4Subject: [PATCH 09/22] Do not disable buffering when writing to oom_score_adj
5
6On musl, disabling buffering when writing to oom_score_adj will
7cause the following error.
8
9 Failed to adjust OOM setting: Invalid argument
10
11This error appears for systemd-udevd.service and dbus.service.
12This is because kernel receives '-' instead of the whole '-900'
13if buffering is disabled.
14
15This is libc implementation specific, as glibc does not have this issue.
16
17Upstream-Status: Inappropriate [musl specific]
18
19Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
20[rebased for systemd 243]
21Signed-off-by: Scott Murray <scott.murray@konsulko.com>
22---
23 src/basic/process-util.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/src/basic/process-util.c b/src/basic/process-util.c
27index 201c5596ae..ea51595b6c 100644
28--- a/src/basic/process-util.c
29+++ b/src/basic/process-util.c
30@@ -1716,7 +1716,7 @@ int set_oom_score_adjust(int value) {
31 xsprintf(t, "%i", value);
32
33 return write_string_file("/proc/self/oom_score_adj", t,
34- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER);
35+ WRITE_STRING_FILE_VERIFY_ON_FAILURE);
36 }
37
38 int get_oom_score_adjust(int *ret) {
39--
402.34.1
41