summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/external/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
new file mode 100644
index 00000000..24e24e8e
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
@@ -0,0 +1,38 @@
+From c7a4efb8bccb52e1714c151929c23e12bde59b82 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 4 Jul 2018 15:00:44 +0800
+Subject: [PATCH 17/24] Do not disable buffering when writing to oom_score_adj
+
+On musl, disabling buffering when writing to oom_score_adj will
+cause the following error.
+
+ Failed to adjust OOM setting: Invalid argument
+
+This error appears for systemd-udevd.service and dbus.service.
+This is because kernel receives '-' instead of the whole '-900'
+if buffering is disabled.
+
+This is libc implementation specific, as glibc does not have this issue.
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[rebased for systemd 243]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ src/basic/process-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/basic/process-util.c b/src/basic/process-util.c
+index b1c08fcade..0a7a1f7d89 100644
+--- a/src/basic/process-util.c
++++ b/src/basic/process-util.c
+@@ -1474,7 +1474,7 @@ int set_oom_score_adjust(int value) {
+ sprintf(t, "%i", value);
+
+ return write_string_file("/proc/self/oom_score_adj", t,
+- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER);
++ WRITE_STRING_FILE_VERIFY_ON_FAILURE);
+ }
+
+ static const char *const ioprio_class_table[] = {