mbox series

[v2,rdma-next,0/2] irdma coverity fixes

Message ID 20210625162329.1654-1-tatyana.e.nikolova@intel.com (mailing list archive)
Headers show
Series irdma coverity fixes | expand

Message

Nikolova, Tatyana E June 25, 2021, 4:23 p.m. UTC
This is a short series of coverity fixes for irdma.

Shiraz Saleem (2):
  RDMA/irdma: Check contents of user-space irdma_mem_reg_req object
  RDMA/irdma: Fix potential overflow expression in irdma_prm_get_pbles

v1->v2
* Add u32 sums for u16 variables to show that the operations are overflow safe.
* Replace shifting ops with DIV_ROUND_UP_ULL macro to get bits_needed

 drivers/infiniband/hw/irdma/pble.h  |  2 +-
 drivers/infiniband/hw/irdma/utils.c |  4 ++--
 drivers/infiniband/hw/irdma/verbs.c | 26 ++++++++++++++++++++------
 3 files changed, 23 insertions(+), 9 deletions(-)

Comments

Jason Gunthorpe June 25, 2021, 5:35 p.m. UTC | #1
On Fri, Jun 25, 2021 at 11:23:27AM -0500, Tatyana Nikolova wrote:
> This is a short series of coverity fixes for irdma.
> 
> Shiraz Saleem (2):
>   RDMA/irdma: Check contents of user-space irdma_mem_reg_req object
>   RDMA/irdma: Fix potential overflow expression in irdma_prm_get_pbles

Applied to for-next, thanks

Jason