diff options
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/pageattr.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/pat.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 0389cb8f6b1a..fb6f2ab40dda 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -658,11 +658,11 @@ static int cpa_process_alias(struct cpa_data *cpa) | |||
658 | struct cpa_data alias_cpa; | 658 | struct cpa_data alias_cpa; |
659 | int ret = 0; | 659 | int ret = 0; |
660 | 660 | ||
661 | if (cpa->pfn > max_pfn_mapped) | 661 | if (cpa->pfn >= max_pfn_mapped) |
662 | return 0; | 662 | return 0; |
663 | 663 | ||
664 | #ifdef CONFIG_X86_64 | 664 | #ifdef CONFIG_X86_64 |
665 | if (cpa->pfn > max_low_pfn_mapped && cpa->pfn < (1UL<<(32-PAGE_SHIFT))) | 665 | if (cpa->pfn >= max_low_pfn_mapped && cpa->pfn < (1UL<<(32-PAGE_SHIFT))) |
666 | return 0; | 666 | return 0; |
667 | #endif | 667 | #endif |
668 | /* | 668 | /* |
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 749766c3c5cd..d4585077977a 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
@@ -449,8 +449,8 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, | |||
449 | if (retval < 0) | 449 | if (retval < 0) |
450 | return 0; | 450 | return 0; |
451 | 451 | ||
452 | if (((pfn <= max_low_pfn_mapped) || | 452 | if (((pfn < max_low_pfn_mapped) || |
453 | (pfn >= (1UL<<(32 - PAGE_SHIFT)) && pfn <= max_pfn_mapped)) && | 453 | (pfn >= (1UL<<(32 - PAGE_SHIFT)) && pfn < max_pfn_mapped)) && |
454 | ioremap_change_attr((unsigned long)__va(offset), size, flags) < 0) { | 454 | ioremap_change_attr((unsigned long)__va(offset), size, flags) < 0) { |
455 | free_memtype(offset, offset + size); | 455 | free_memtype(offset, offset + size); |
456 | printk(KERN_INFO | 456 | printk(KERN_INFO |