RDMA: Check umem pointer validity prior to release
Update ib_umem_release() to behave similarly to kfree() and allow
submitting NULL pointer as safe input to this function.
Fixes: a52c8e2469
("RDMA: Clean destroy CQ in drivers do not return errors")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

szülő
89a6da3cb8
commit
836a0fbb3e
@@ -2004,8 +2004,7 @@ static int i40iw_dereg_mr(struct ib_mr *ib_mr, struct ib_udata *udata)
|
||||
struct cqp_commands_info *cqp_info;
|
||||
u32 stag_idx;
|
||||
|
||||
if (iwmr->region)
|
||||
ib_umem_release(iwmr->region);
|
||||
ib_umem_release(iwmr->region);
|
||||
|
||||
if (iwmr->type != IW_MEMREG_TYPE_MEM) {
|
||||
/* region is released. only test for userness. */
|
||||
|
Reference in New Issue
Block a user