Skip to content

Commit

Permalink
Revert "uio: fix vma io range check in mmap"
Browse files Browse the repository at this point in the history
This reverts commit ddb0975.

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 <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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed Jun 17, 2014
1 parent 7171511 commit b29f680
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/uio/uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b29f680

Please sign in to comment.