From: Greg Kroah-Hartman Date: Wed, 20 Sep 2023 10:59:45 +0000 (+0200) Subject: 6.5-stable patches X-Git-Tag: v5.10.196~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f00f0091855e2ee5f9292fb15854fee765dc19ff;p=thirdparty%2Fkernel%2Fstable-queue.git 6.5-stable patches added patches: revert-memcg-drop-kmem.limit_in_bytes.patch --- diff --git a/queue-6.5/revert-memcg-drop-kmem.limit_in_bytes.patch b/queue-6.5/revert-memcg-drop-kmem.limit_in_bytes.patch new file mode 100644 index 00000000000..730ab89ccbf --- /dev/null +++ b/queue-6.5/revert-memcg-drop-kmem.limit_in_bytes.patch @@ -0,0 +1,65 @@ +From 19cf24ef28d43eb50b0f1f79eb644938f5ec59e5 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Wed, 20 Sep 2023 12:57:00 +0200 +Subject: Revert "memcg: drop kmem.limit_in_bytes" + +From: Greg Kroah-Hartman + +This reverts commit 75bb29b6c44f486e9bd048759669c205dccb2048 which is +commit 86327e8eb94c52eca4f93cfece2e29d1bf52acbf upstream. + +It breaks existing runc systems, as the tool always thinks the file +should be present. + +Reported-by: Jeremi Piotrowski +Link: https://lore.kernel.org/r/20230920081101.GA12096@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net +Cc: Michal Hocko +Cc: Shakeel Butt +Cc: Johannes Weiner +Cc: Roman Gushchin +Cc: Muchun Song +Cc: Tejun Heo +Cc: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/admin-guide/cgroup-v1/memory.rst | 2 ++ + mm/memcontrol.c | 10 ++++++++++ + 2 files changed, 12 insertions(+) + +--- a/Documentation/admin-guide/cgroup-v1/memory.rst ++++ b/Documentation/admin-guide/cgroup-v1/memory.rst +@@ -92,6 +92,8 @@ Brief summary of control files. + memory.oom_control set/show oom controls. + memory.numa_stat show the number of memory usage per numa + node ++ memory.kmem.limit_in_bytes This knob is deprecated and writing to ++ it will return -ENOTSUPP. + memory.kmem.usage_in_bytes show current kernel memory allocation + memory.kmem.failcnt show the number of kernel memory usage + hits limits +--- a/mm/memcontrol.c ++++ b/mm/memcontrol.c +@@ -3871,6 +3871,10 @@ static ssize_t mem_cgroup_write(struct k + case _MEMSWAP: + ret = mem_cgroup_resize_max(memcg, nr_pages, true); + break; ++ case _KMEM: ++ /* kmem.limit_in_bytes is deprecated. */ ++ ret = -EOPNOTSUPP; ++ break; + case _TCP: + ret = memcg_update_tcp_max(memcg, nr_pages); + break; +@@ -5082,6 +5086,12 @@ static struct cftype mem_cgroup_legacy_f + }, + #endif + { ++ .name = "kmem.limit_in_bytes", ++ .private = MEMFILE_PRIVATE(_KMEM, RES_LIMIT), ++ .write = mem_cgroup_write, ++ .read_u64 = mem_cgroup_read_u64, ++ }, ++ { + .name = "kmem.usage_in_bytes", + .private = MEMFILE_PRIVATE(_KMEM, RES_USAGE), + .read_u64 = mem_cgroup_read_u64, diff --git a/queue-6.5/series b/queue-6.5/series index ca8f9e28403..37f94708062 100644 --- a/queue-6.5/series +++ b/queue-6.5/series @@ -207,3 +207,4 @@ drm-amd-display-adjust-the-mst-resume-flow.patch drm-amd-display-fix-the-white-screen-issue-when-64gb-dram.patch drm-amd-display-add-dpia-link-encoder-assignment-fix.patch drm-amd-display-fix-2nd-dpia-encoder-assignment.patch +revert-memcg-drop-kmem.limit_in_bytes.patch