Skip to content
Commit c6ce5807 authored by Doug Ledford's avatar Doug Ledford Committed by Jason Gunthorpe
Browse files

RDMA/umem: Fix potential addition overflow



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: default avatarJason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 3312d1c6
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