commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=1a44e426a3033db9be15a81dd87c5ff64fb997b1
branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/trunk

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 1258176..6de983c 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1844,7 +1844,7 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
 {
 	unsigned long end = addr + PAGE_ALIGN(size);
 
-	if (addr != (pfn << PAGE_SHIFT))
+	if ((addr & PAGE_MASK) != (pfn << PAGE_SHIFT))
 		return -EINVAL;
 
 	if (addr == vma->vm_start && end == vma->vm_end) {
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to