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