Shiraz Saleem c4eb44ffd9 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/20210622175232.439-3-tatyana.e.nikolova@intel.com
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1505149 ("Integer handling issues")
Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-06-22 15:25:47 -03:00
..
2021-06-11 17:57:24 +02:00
2021-05-05 13:24:11 -07:00
2021-04-18 09:36:56 +03:00
2021-06-22 14:43:51 -03:00
2021-06-12 12:13:55 -07:00
2021-05-20 06:31:52 -10:00
2021-06-16 09:03:52 -07:00
2021-04-28 15:59:13 -07:00
2021-05-23 11:39:02 +02:00
2021-04-26 12:11:52 -07:00
2021-04-27 18:09:44 -07:00
2021-05-01 10:14:08 -07:00
2021-04-08 19:18:07 +02:00
2021-06-17 15:22:31 +02:00
2021-06-12 11:59:58 -07:00
2021-04-28 15:59:13 -07:00
2021-06-18 13:54:11 -07:00
2021-05-01 10:14:08 -07:00
2021-05-05 12:53:16 -07:00
2021-06-08 09:41:16 -07:00
2021-05-04 11:13:33 -07:00
2021-05-05 13:24:11 -07:00
2021-05-03 12:15:21 -07:00
2021-06-13 12:25:33 -07:00
2021-06-05 15:43:11 -07:00
2021-05-05 13:31:39 -07:00
2021-04-28 15:59:13 -07:00
2021-05-05 13:31:39 -07:00