Skip to contentSkip to conversation

m68k-handle-pgtable_page_ctor-fail.patch removed from -mm tree

merged [email protected] 1 participant 1 message Nov 15, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: [merged] m68k-handle-pgtable_page_ctor-fail.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 15 Nov 2013 12:08:16 -0800

The patch titled
Subject: m68k: handle pgtable_page_ctor() fail
has been removed from the -mm tree. Its filename was
m68k-handle-pgtable_page_ctor-fail.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: "Kirill A. Shutemov" <[email protected]>
Subject: m68k: handle pgtable_page_ctor() fail

---

 arch/m68k/include/asm/mcf_pgalloc.h      |    4 ++++
 arch/m68k/include/asm/motorola_pgalloc.h |    8 ++++++--
 arch/m68k/include/asm/sun3_pgalloc.h     |    5 ++++-
 3 files changed, 14 insertions(+), 3 deletions(-)
arch/m68k/include/asm/mcf_pgalloc.h renamed from arch/m68k/include/asm/mcf_pgalloc.h~m68k-handle-pgtable_page_ctor-fail +4 -0
diff -puN arch/m68k/include/asm/mcf_pgalloc.h~m68k-handle-pgtable_page_ctor-fail arch/m68k/include/asm/mcf_pgalloc.h
@@ -56,6 +56,10 @@ static inline struct page *pte_alloc_one
 
 	if (!page)
 		return NULL;
+	if (!pgtable_page_ctor(page)) {
+		__free_page(page);
+		return NULL;
+	}
 
 	pte = kmap(page);
 	if (pte) {
arch/m68k/include/asm/motorola_pgalloc.h renamed from arch/m68k/include/asm/motorola_pgalloc.h~m68k-handle-pgtable_page_ctor-fail +6 -2
diff -puN arch/m68k/include/asm/motorola_pgalloc.h~m68k-handle-pgtable_page_ctor-fail arch/m68k/include/asm/motorola_pgalloc.h
@@ -29,18 +29,22 @@ static inline void pte_free_kernel(struc
 
 static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
 {
-	struct page *page = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
+	struct page *page;
 	pte_t *pte;
 
+	page = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
 	if(!page)
 		return NULL;
+	if (!pgtable_page_ctor(page)) {
+		__free_page(page);
+		return NULL;
+	}
 
 	pte = kmap(page);
 	__flush_page_to_ram(pte);
 	flush_tlb_kernel_page(pte);
 	nocache_page(pte);
 	kunmap(page);
-	pgtable_page_ctor(page);
 	return page;
 }
 
arch/m68k/include/asm/sun3_pgalloc.h renamed from arch/m68k/include/asm/sun3_pgalloc.h~m68k-handle-pgtable_page_ctor-fail +4 -1
diff -puN arch/m68k/include/asm/sun3_pgalloc.h~m68k-handle-pgtable_page_ctor-fail arch/m68k/include/asm/sun3_pgalloc.h
@@ -59,7 +59,10 @@ static inline pgtable_t pte_alloc_one(st
 		return NULL;
 
 	clear_highpage(page);
-	pgtable_page_ctor(page);
+	if (!pgtable_page_ctor(page)) {
+		__free_page(page);
+		return NULL;
+	}
 	return page;
 
 }

_

Patches currently in -mm which might be from [email protected] are

origin.patch x86-mm-get-aslr-work-for-hugetlb-mappings.patch mm-drop-actor-argument-of-do_generic_file_read-fix.patch