KVM: make checks stricter in coalesced_mmio_in_range()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 19 Oct 2011 06:15:10 +0000 (09:15 +0300)
committerAvi Kivity <avi@redhat.com>
Tue, 27 Dec 2011 09:17:07 +0000 (11:17 +0200)
My testing version of Smatch complains that addr and len come from
the user and they can wrap.  The path is:
  -> kvm_vm_ioctl()
     -> kvm_vm_ioctl_unregister_coalesced_mmio()
        -> coalesced_mmio_in_range()

I don't know what the implications are of wrapping here, but we may
as well fix it, if only to silence the warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

No differences found