]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jul 2021 07:48:47 +0000 (09:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jul 2021 07:48:47 +0000 (09:48 +0200)
added patches:
revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch

queue-5.4/revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch b/queue-5.4/revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch
new file mode 100644 (file)
index 0000000..89028ef
--- /dev/null
@@ -0,0 +1,44 @@
+From huangpei@loongson.cn  Mon Jul 26 09:44:23 2021
+From: Huang Pei <huangpei@loongson.cn>
+Date: Mon, 26 Jul 2021 15:26:42 +0800
+Subject: [PATCH] Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one"
+To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>, ambrosehua@gmail.com
+Cc: Bibo Mao <maobibo@loongson.cn>, stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Li Xuefeng <lixuefeng@loongson.cn>, Yang Tiezhu <yangtiezhu@loongson.cn>, Gao Juxin <gaojuxin@loongson.cn>, Huacai Chen <chenhuacai@loongson.cn>, Jinyang He <hejinyang@loongson.cn>
+Message-ID: <20210726072642.551510-2-huangpei@loongson.cn>
+
+From: Huang Pei <huangpei@loongson.cn>
+
+This reverts commit 002d8b395fa1c0679fc3c3e68873de6c1cc300a2 which is
+commit ed914d48b6a1040d1039d371b56273d422c0081e upstream.
+
+Commit b2b29d6d011944 (mm: account PMD tables like PTE tables) is
+introduced between v5.9 and v5.10, so this fix (commit 002d8b395fa1)
+should NOT apply to any pre-5.10 branch.
+
+Signed-off-by: Huang Pei <huangpei@loongson.cn>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/mips/include/asm/pgalloc.h |   10 +++-------
+ 1 file changed, 3 insertions(+), 7 deletions(-)
+
+--- a/arch/mips/include/asm/pgalloc.h
++++ b/arch/mips/include/asm/pgalloc.h
+@@ -62,15 +62,11 @@ do {                                                       \
+ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
+ {
+-      pmd_t *pmd = NULL;
+-      struct page *pg;
++      pmd_t *pmd;
+-      pg = alloc_pages(GFP_KERNEL | __GFP_ACCOUNT, PMD_ORDER);
+-      if (pg) {
+-              pgtable_pmd_page_ctor(pg);
+-              pmd = (pmd_t *)page_address(pg);
++      pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, PMD_ORDER);
++      if (pmd)
+               pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table);
+-      }
+       return pmd;
+ }
index 14a9234e2e87d9349ffaa234a10ba07376e560bc..f7ea23841fbbfbedc71efafa1b8fd6c67d43bfb0 100644 (file)
@@ -67,3 +67,4 @@ sctp-update-active_key-for-asoc-when-old-key-is-bein.patch
 net-sched-cls_api-fix-the-the-wrong-parameter.patch
 drm-panel-raspberrypi-touchscreen-prevent-double-fre.patch
 proc-avoid-mixing-integer-types-in-mem_rw.patch
+revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch