Re: [PATCH rdma-next 2/3] RDMA/irdma: Check return value from ib_umem_find_best_pgsz

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 22, 2021 at 12:52:31PM -0500, Tatyana Nikolova wrote:
> From: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>
> 
> 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.
> 
> Reported-by: coverity-bot <keescook+coverity-bot@xxxxxxxxxxxx>
> Addresses-Coverity-ID: 1505149 ("Integer handling issues")
> Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
> Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>
> Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@xxxxxxxxx>
> ---
>  drivers/infiniband/hw/irdma/verbs.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

This patch applied to for-next, thanks

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux