Revert "uio: fix vma io range check in mmap"

This reverts commit ddb09754e6.

Linus objected to this originally, I can see why it might be needed, but
given that no one spoke up defending this patch, I'm going to revert it.

If you have hardware that requires this change, please speak up in the
future and defend the patch.

Reported-by: Linus Torvalds <[email protected]>
Cc: Bin Wang <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Norbert Ciosek <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Greg Kroah-Hartman 2014-06-17 16:07:08 -07:00
commit b29f680c4f

View file

@ -655,7 +655,7 @@ static int uio_mmap_physical(struct vm_area_struct *vma)
if (mem->addr & ~PAGE_MASK)
return -ENODEV;
if (vma->vm_end - vma->vm_start > PAGE_ALIGN(mem->size))
if (vma->vm_end - vma->vm_start > mem->size)
return -EINVAL;
vma->vm_ops = &uio_physical_vm_ops;