Commit b29f680c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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

This reverts commit ddb09754.

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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Cc: Bin Wang <binw@marvell.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Norbert Ciosek <norbertciosek@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7171511e
...@@ -655,7 +655,7 @@ static int uio_mmap_physical(struct vm_area_struct *vma) ...@@ -655,7 +655,7 @@ static int uio_mmap_physical(struct vm_area_struct *vma)
if (mem->addr & ~PAGE_MASK) if (mem->addr & ~PAGE_MASK)
return -ENODEV; return -ENODEV;
if (vma->vm_end - vma->vm_start > PAGE_ALIGN(mem->size)) if (vma->vm_end - vma->vm_start > mem->size)
return -EINVAL; return -EINVAL;
vma->vm_ops = &uio_physical_vm_ops; vma->vm_ops = &uio_physical_vm_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment