linux-next: manual merge of the rdma tree with the origin tree

Mark Brown posted 1 patch 6 days, 16 hours ago
linux-next: manual merge of the rdma tree with the origin tree
Posted by Mark Brown 6 days, 16 hours ago
Hi all,

Today's linux-next merge of the rdma tree got conflicts in:

  drivers/infiniband/hw/mana/qp.c
  drivers/infiniband/hw/mlx4/srq.c

between commits:

  c54c7e4cb679c ("RDMA/mlx4: Fix resource leak on error in mlx4_ib_create_srq()")
  6aaa978c6b621 ("RDMA/mana: Fix error unwind in mana_ib_create_qp_rss()")

from the origin tree and commits:

  271746ec81325 ("RDMA: Convert drivers using min to ib_respond_udata()")
  22d072b3bcc59 ("RDMA: Convert drivers using sizeof() to ib_respond_udata()")
  23a45206d20de ("RDMA: Use proper driver data response structs instead of open coding")

from the rdma tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/infiniband/hw/mana/qp.c
index 0fbcf449c134b,c50a1eafee58c..0000000000000
--- a/drivers/infiniband/hw/mana/qp.c
+++ b/drivers/infiniband/hw/mana/qp.c
@@@ -212,13 -210,9 +212,9 @@@ static int mana_ib_create_qp_rss(struc
  	if (ret)
  		goto fail;
  
- 	ret = ib_copy_to_udata(udata, &resp, sizeof(resp));
- 	if (ret) {
- 		ibdev_dbg(&mdev->ib_dev,
- 			  "Failed to copy to udata create rss-qp, %d\n",
- 			  ret);
+ 	ret = ib_respond_udata(udata, resp);
+ 	if (ret)
 -		goto fail;
 +		goto err_disable_vport_rx;
- 	}
  
  	kfree(mana_ind_table);
  
diff --cc drivers/infiniband/hw/mlx4/srq.c
index 767840736d583,0b4df4f48ca14..0000000000000
--- a/drivers/infiniband/hw/mlx4/srq.c
+++ b/drivers/infiniband/hw/mlx4/srq.c
@@@ -191,11 -191,15 +191,15 @@@ int mlx4_ib_create_srq(struct ib_srq *i
  	srq->msrq.event = mlx4_ib_srq_event;
  	srq->ibsrq.ext.xrc.srq_num = srq->msrq.srqn;
  
- 	if (udata)
- 		if (ib_copy_to_udata(udata, &srq->msrq.srqn, sizeof (__u32))) {
- 			err = -EFAULT;
+ 	if (udata) {
+ 		struct mlx4_ib_create_srq_resp uresp = {
+ 			.srqn = srq->msrq.srqn
+ 		};
+ 
+ 		err = ib_respond_udata(udata, uresp);
+ 		if (err)
 -			goto err_wrid;
 +			goto err_srq;
- 		}
+ 	}
  
  	init_attr->attr.max_wr = srq->msrq.max - 1;