commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=4e9ce991f4ff3a7d73ca4ac775081bdc34c0da42 branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/trunk-next
If param addr is not page aligned, the check in remap_pfn_range() will fail. This patch fix it. Signed-off-by: Bob Liu <[email protected]> --- mm/nommu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/nommu.c b/mm/nommu.c index 7bee79f..794beab 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1836,7 +1836,7 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address, int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, unsigned long size, pgprot_t prot) { - if (addr != (pfn << PAGE_SHIFT)) + if ((addr & PAGE_MASK) != (pfn << PAGE_SHIFT)) return -EINVAL; vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
_______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
