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

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

 



Hi all,

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

  drivers/infiniband/core/uverbs_cmd.c

between commit:

  4fae7f170416 ("RDMA/uverbs: Fix slab-out-of-bounds in ib_uverbs_ex_create_flow")

from the rdma-fixes tree and commit:

  2cc1e3b80942 ("IB/uverbs: Replace file->ucontext with file in uverbs_cmd.c")

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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/infiniband/core/uverbs_cmd.c
index cc06e8404e9b,d048cabc4246..000000000000
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@@ -3559,11 -3505,11 +3505,16 @@@ int ib_uverbs_ex_create_flow(struct ib_
  		goto err_uobj;
  	}
  
 +	if (qp->qp_type != IB_QPT_UD && qp->qp_type != IB_QPT_RAW_PACKET) {
 +		err = -EINVAL;
 +		goto err_put;
 +	}
 +
+ 	if (!qp->device->create_flow) {
+ 		err = -EOPNOTSUPP;
+ 		goto err_put;
+ 	}
+ 
  	flow_attr = kzalloc(struct_size(flow_attr, flows,
  				cmd.flow_attr.num_of_specs), GFP_KERNEL);
  	if (!flow_attr) {
@@@ -3583,15 -3529,13 +3534,15 @@@
  	flow_attr->flags = kern_flow_attr->flags;
  	flow_attr->size = sizeof(*flow_attr);
  
 -	kern_spec = kern_flow_attr + 1;
 +	kern_spec = kern_flow_attr->flow_specs;
  	ib_spec = flow_attr + 1;
  	for (i = 0; i < flow_attr->num_of_specs &&
 -	     cmd.flow_attr.size > offsetof(struct ib_uverbs_flow_spec, reserved) &&
 -	     cmd.flow_attr.size >=
 -	     ((struct ib_uverbs_flow_spec *)kern_spec)->size; i++) {
 -		err = kern_spec_to_ib_spec(file, kern_spec, ib_spec, uflow_res);
 +			cmd.flow_attr.size >= sizeof(*kern_spec) &&
 +			cmd.flow_attr.size >= kern_spec->size;
 +	     i++) {
 +		err = kern_spec_to_ib_spec(
- 				file->ucontext, (struct ib_uverbs_flow_spec *)kern_spec,
++				file, (struct ib_uverbs_flow_spec *)kern_spec,
 +				ib_spec, uflow_res);
  		if (err)
  			goto err_free;
  

Attachment: pgpMgvFKomegq.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux