Skip to contentSkip to conversation

Patch "ARC: mm: PAE40: Fix crash at munmap" has been added to the 4.8-stable tree

PATCH [email protected] 1 participant 1 message Dec 2, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ARC: mm: PAE40: Fix crash at munmap

to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
arc-mm-pae40-fix-crash-at-munmap.patch
and it can be found in the queue-4.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 6a8b2ca702b279bea0e8f0363056439352e2081c Mon Sep 17 00:00:00 2001

From: Yuriy Kolerov <[email protected]>
Date: Mon, 28 Nov 2016 07:07:17 +0300
Subject: ARC: mm: PAE40: Fix crash at munmap

From: Yuriy Kolerov <[email protected]>

commit 6a8b2ca702b279bea0e8f0363056439352e2081c upstream.

commit 1c3c90930392 broke PAE40. Macro pfn_pte(pfn, prot) creates paddr from pfn, but the page shift was getting truncated to 32 bits since we lost the proper cast to 64 bits (for PAE400

Instead of reverting that commit, use a better helper which is 32/64 bits safe just like ARM implementation.

Fixes 1c3c90930392 ("ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS")
[vgupta: massaged changelog]
---
 arch/arc/include/asm/pgtable.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arc/include/asm/pgtable.h +1 -1
@@ -280,7 +280,7 @@ static inline void pmd_set(pmd_t *pmdp,
 
 #define pte_page(pte)		pfn_to_page(pte_pfn(pte))
 #define mk_pte(page, prot)	pfn_pte(page_to_pfn(page), prot)
-#define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define pfn_pte(pfn, prot)	__pte(__pfn_to_phys(pfn) | pgprot_val(prot))
 
 /* Don't use virt_to_pfn for macros below: could cause truncations for PAE40*/
 #define pte_pfn(pte)		(pte_val(pte) >> PAGE_SHIFT)

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

queue-4.8/arc-mm-pae40-fix-crash-at-munmap.patch