diff options
| -rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 3e90b6a1d9d2..89c4ce2da78b 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -3559,6 +3559,11 @@ int ib_uverbs_ex_create_flow(struct ib_uverbs_file *file,  		goto err_uobj;  	} +	if (qp->qp_type != IB_QPT_UD && qp->qp_type != IB_QPT_RAW_PACKET) { +		err = -EINVAL; +		goto err_put; +	} +  	flow_attr = kzalloc(struct_size(flow_attr, flows,  				cmd.flow_attr.num_of_specs), GFP_KERNEL);  	if (!flow_attr) {  | 
