Message ID | fa0190c08a47cdb0e38ecdec79ee9935a6daa0b3.1385501822.git.ydroneaud@opteya.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index d9d91c412628..f1ba441cd2ed 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -2795,6 +2795,9 @@ int ib_uverbs_ex_destroy_flow(struct ib_uverbs_file *file, if (ret) return ret; + if (cmd.comp_mask) + return -EINVAL; + uobj = idr_write_uobj(&ib_uverbs_rule_idr, cmd.flow_handle, file->ucontext); if (!uobj)
Just like the check added to create_flow in 22878dbc9173, comp_mask must be checked in destroy_flow too. Since only empty comp_mask is currently supported, any other value must be rejected. Link: http://marc.info/?i=cover.1385501822.git.ydroneaud@opteya.com Cc: Matan Barak <matanb@mellanox.com> Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> --- drivers/infiniband/core/uverbs_cmd.c | 3 +++ 1 file changed, 3 insertions(+)