RDMA/umem: Fix potential addition overflow
mainline inclusion from mainline-4.20-rc1 commit c6ce5807 category: bugfix bugzilla: 6452 CVE: NA -------------------------- Since Virtual Lanes BCT credits and MTU are set through separate MADs, we Given a large enough memory allocation, it is possible to wrap the pinned_vm counter. Check for addition overflow to prevent such eventualities. Fixes: 40ddacf2 ("RDMA/umem: Don't hold mmap_sem for too long") Reported-by:Jason Gunthorpe <jgg@ziepe.ca> Signed-off-by:
Doug Ledford <dledford@redhat.com> Reviewed-by:
Leon Romanovsky <leonro@mellanox.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com> Signed-off-by:
Jing Xiangfeng <jingxiangfeng@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment