diff options
| author | Dan Streetman <ddstreet@canonical.com> | 2020-09-21 07:33:38 -0400 |
|---|---|---|
| committer | Dan Streetman <ddstreet@canonical.com> | 2020-09-21 07:33:38 -0400 |
| commit | 61adb797642f3dd2e5c14f7914c2949c665cefe8 (patch) | |
| tree | 90ca235b05684a25292b240317e707029674223c | |
| parent | d556bed0e5bf9e29ae3f35362ac3ca43c83e9a79 (diff) | |
Increase RLIMIT_MEMLOCK default to 64m
LP: #1830746
| -rw-r--r-- | debian/patches/lp1830746-bump-mlock-ulimit-to-64Mb.patch | 31 | ||||
| -rw-r--r-- | debian/patches/series | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/lp1830746-bump-mlock-ulimit-to-64Mb.patch b/debian/patches/lp1830746-bump-mlock-ulimit-to-64Mb.patch new file mode 100644 index 0000000000..1e7c1b6dbd --- /dev/null +++ b/debian/patches/lp1830746-bump-mlock-ulimit-to-64Mb.patch @@ -0,0 +1,31 @@ +From 91cfdd8d29b353dc1fd825673c9a23e00c92a341 Mon Sep 17 00:00:00 2001 +From: Roman Gushchin <guro@fb.com> +Date: Thu, 23 Aug 2018 10:46:20 -0700 +Subject: [PATCH] core: bump mlock ulimit to 64Mb +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1830746 +Origin: upstream, https://github.com/systemd/systemd/commit/91cfdd8d29b3 + +Bpf programs are charged against memlock ulimit, and the default value +can be too tight on machines with many cgroups and attached bpf programs. + +Let's bump it to 64Mb. +--- + src/core/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/main.c b/src/core/main.c +index ce45f2ded234..88656dcabf56 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -1295,7 +1295,7 @@ static int bump_rlimit_memlock(struct rlimit *saved_rlimit) { + if (getrlimit(RLIMIT_MEMLOCK, saved_rlimit) < 0) + return log_warning_errno(errno, "Reading RLIMIT_MEMLOCK failed, ignoring: %m"); + +- r = setrlimit_closest(RLIMIT_MEMLOCK, &RLIMIT_MAKE_CONST(1024ULL*1024ULL*16ULL)); ++ r = setrlimit_closest(RLIMIT_MEMLOCK, &RLIMIT_MAKE_CONST(1024ULL*1024ULL*64ULL)); + if (r < 0) + return log_warning_errno(r, "Setting RLIMIT_MEMLOCK failed, ignoring: %m"); + +-- +2.28.0 + diff --git a/debian/patches/series b/debian/patches/series index 3891d962ee..d061bd6bc0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -221,3 +221,4 @@ lp1886197-seccomp-more-comprehensive-protection-against-libsec.patch lp1832754/0001-umount-Try-unmounting-even-if-remounting-read-only-f.patch lp1832754/0002-umount-Don-t-bother-remounting-api-and-ro-filesystem.patch lp1886115-pid1-fix-free-of-uninitialized-pointer-in-unit_fail_.patch +lp1830746-bump-mlock-ulimit-to-64Mb.patch |
