Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RDMA/irdma: Check return value from ib_umem_find_best_pgsz
iwmr->page_size stores the return from ib_umem_find_best_pgsz and maybe zero when used in ib_umem_num_dma_blocks thus causing a divide by zero error. Fix this by erroring out of irdma_reg_user when 0 is returned from ib_umem_find_best_pgsz. Link: https://lore.kernel.org/r/[email protected] Reported-by: coverity-bot <[email protected]> Addresses-Coverity-ID: 1505149 ("Integer handling issues") Fixes: b48c24c ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Tatyana Nikolova <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
- Loading branch information