Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] RDMA/core: fix return error value to negative
@ 2020-07-25  2:56 Li Heng
  2020-07-27 10:36 ` Parav Pandit
  2020-07-27 15:59 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Li Heng @ 2020-07-25  2:56 UTC (permalink / raw)
  To: jgg, dledford; +Cc: linux-rdma, linux-kernel

Fixes: 8d9ec9addd6c (IB/core: Add a sgid_attr pointer to struct rdma_ah_attr)
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Li Heng <liheng40@huawei.com>
---
 drivers/infiniband/core/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 53d6505c..f369f0a 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1712,7 +1712,7 @@ static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr,
 		if (!(rdma_protocol_ib(qp->device,
 				       attr->alt_ah_attr.port_num) &&
 		      rdma_protocol_ib(qp->device, port))) {
-			ret = EINVAL;
+			ret = -EINVAL;
 			goto out;
 		}
 	}
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] RDMA/core: fix return error value to negative
  2020-07-25  2:56 [PATCH] RDMA/core: fix return error value to negative Li Heng
@ 2020-07-27 10:36 ` Parav Pandit
  2020-07-27 15:59 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Parav Pandit @ 2020-07-27 10:36 UTC (permalink / raw)
  To: Li Heng, Jason Gunthorpe, dledford; +Cc: linux-rdma, linux-kernel

> From: linux-rdma-owner@vger.kernel.org <linux-rdma-owner@vger.kernel.org>
> On Behalf Of Li Heng
> Sent: Saturday, July 25, 2020 8:26 AM
> 
> Fixes: 8d9ec9addd6c (IB/core: Add a sgid_attr pointer to struct rdma_ah_attr)
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Li Heng <liheng40@huawei.com>
> ---
>  drivers/infiniband/core/verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
> index 53d6505c..f369f0a 100644
> --- a/drivers/infiniband/core/verbs.c
> +++ b/drivers/infiniband/core/verbs.c
> @@ -1712,7 +1712,7 @@ static int _ib_modify_qp(struct ib_qp *qp, struct
> ib_qp_attr *attr,
>  		if (!(rdma_protocol_ib(qp->device,
>  				       attr->alt_ah_attr.port_num) &&
>  		      rdma_protocol_ib(qp->device, port))) {
> -			ret = EINVAL;
> +			ret = -EINVAL;
>  			goto out;
>  		}
>  	}
> --
> 2.7.4

With below corrected fixes tag,

Fixes: 7a5c938b9ed0 ("IB/core: Check for rdma_protocol_ib only after validating port_num")
Reviewed-by: Parav Pandit <parav@mellanox.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] RDMA/core: fix return error value to negative
  2020-07-25  2:56 [PATCH] RDMA/core: fix return error value to negative Li Heng
  2020-07-27 10:36 ` Parav Pandit
@ 2020-07-27 15:59 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-07-27 15:59 UTC (permalink / raw)
  To: Li Heng; +Cc: dledford, linux-rdma, linux-kernel

On Sat, Jul 25, 2020 at 10:56:27AM +0800, Li Heng wrote:
> Fixes: 8d9ec9addd6c (IB/core: Add a sgid_attr pointer to struct rdma_ah_attr)
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Li Heng <liheng40@huawei.com>
> Reviewed-by: Parav Pandit <parav@mellanox.com>
> ---
>  drivers/infiniband/core/verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25  2:56 [PATCH] RDMA/core: fix return error value to negative Li Heng
2020-07-27 10:36 ` Parav Pandit
2020-07-27 15:59 ` Jason Gunthorpe

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git