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

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

diff --git a/queue-4.9/revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch b/queue-4.9/revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch
new file mode 100644 (file)
index 0000000..ad40c19
--- /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 fc5705b28e51f61c5549679fe6b433dc9471cffc 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
+@@ -107,15 +107,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 5c53c643e9bda02a0a2e35bf5f17798118eafd6d..d8a2729a339004feb77b8055df1c3e2e40eefbd6 100644 (file)
@@ -40,3 +40,4 @@ scsi-iscsi-fix-iface-sysfs-attr-detection.patch
 scsi-target-fix-protect-handling-in-write-same-32.patch
 revert-usb-quirks-ignore-remote-wake-up-on-fibocom-l.patch
 proc-avoid-mixing-integer-types-in-mem_rw.patch
+revert-mips-add-pmd-table-accounting-into-mips-pmd_alloc_one.patch