Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1201162
| From | Toshi Kani <toshi.kani@hp.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 10/10] x86/mm: Fix the same pgprot handling in try_preserve_large_page() |
| Date | 2015-08-05 23:50 +0200 |
| Message-ID | <pUeJs-5l3-31@gated-at.bofh.it> (permalink) |
| References | <pUeJr-5l3-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
try_preserve_large_page() checks if new_prot is the same as old_prot. If so, it simply sets do_split to 0, and returns with no-operation. However, old_prot is set as a 4KB pgprot value while new_prot is a large page pgprot value. Now that old_prot is initially set from p?d_pgprot() as a large page pgprot value, fix it by not overwriting old_prot with a 4KB pgprot value. Signed-off-by: Toshi Kani <toshi.kani@hp.com> Cc: Juergen Gross <jgross@suse.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Andrew Morton <akpm@linux-foundation.org> --- arch/x86/mm/pageattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index d0e40ed..6f9b885 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -519,7 +519,7 @@ try_preserve_large_page(pte_t *kpte, unsigned long address, * up accordingly. */ old_pte = *kpte; - old_prot = req_prot = pgprot_large_2_4k(old_prot); + req_prot = pgprot_large_2_4k(old_prot); pgprot_val(req_prot) &= ~pgprot_val(cpa->mask_clr); pgprot_val(req_prot) |= pgprot_val(cpa->mask_set); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/10] x86/mm: Handle large PAT bit in pud/pmd interfaces Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200 [PATCH v3 9/10] x86/mm: Fix __split_large_page() to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200 [PATCH v3 1/10] x86/vdso32: Define PGTABLE_LEVELS to 32bit VDSO Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200 [PATCH v3 10/10] x86/mm: Fix the same pgprot handling in try_preserve_large_page() Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200 [PATCH v3 6/10] x86/mm: Fix slow_virt_to_phys() to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200 [PATCH v3 3/10] x86/asm: Fix pud/pmd interfaces to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200 [PATCH v3 7/10] x86/mm: Fix gup_huge_p?d() to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200 [PATCH v3 2/10] x86/asm: Move PUD_PAGE macros to page_types.h Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200 [PATCH v3 8/10] x86/mm: Fix try_preserve_large_page() to handle large PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200 [PATCH v3 5/10] x86/mm: Fix page table dump to show PAT bit Toshi Kani <toshi.kani@hp.com> - 2015-08-05 23:50 +0200
csiph-web