Re: [PATCH for-rc] RDMA/qedr: Fix qedr_create_user_qp error flow

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

 



On Tue, Feb 06, 2024 at 12:54:49PM -0500, Kamal Heib wrote:
> Avoid the following warning by making sure to call qedr_cleanup_user()
> in case qedr_init_user_queue() failed.

<...>

> diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
> index 7887a6786ed4..0943abd4de27 100644
> --- a/drivers/infiniband/hw/qedr/verbs.c
> +++ b/drivers/infiniband/hw/qedr/verbs.c
> @@ -1880,7 +1880,7 @@ static int qedr_create_user_qp(struct qedr_dev *dev,
>  		rc = qedr_init_user_queue(udata, dev, &qp->urq, ureq.rq_addr,
>  					  ureq.rq_len, true, 0, alloc_and_init);
>  		if (rc)
> -			return rc;
> +			goto err1;

"goto err1" will cause to call to qedr_cleanup_user() which will call to qedr_free_pbl()
with qp->urq.pbl_tbl) which can be NULL.

Thanks

>  	}
>  
>  	memset(&in_params, 0, sizeof(in_params));
> -- 
> 2.43.0
> 
> 




[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