]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: Fix the calculation in vhost_overflow()
authorXie Yongji <xieyongji@bytedance.com>
Wed, 28 Jul 2021 13:07:56 +0000 (21:07 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 11 Aug 2021 10:44:15 +0000 (06:44 -0400)
commit937f4c1f2f40ffd3a81bb8de6140d09c45abf25a
tree1f9b72676673a8a42c252b8947fd26f59b789388
parent180f9ca202e974e8832a0bd6b9a8b2aac6f97b39
vhost: Fix the calculation in vhost_overflow()

This fixes the incorrect calculation for integer overflow
when the last address of iova range is 0xffffffff.

Fixes: 5e3f4d573cd1 ("vhost: detect 32 bit integer wrap around")
Reported-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210728130756.97-2-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vhost.c