|
@@ -2649,6 +2649,9 @@ int ib_uverbs_ex_create_flow(struct ib_uverbs_file *file,
|
|
void *ib_spec;
|
|
void *ib_spec;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
|
|
+ if (ucore->inlen < sizeof(cmd))
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
if (ucore->outlen < sizeof(resp))
|
|
if (ucore->outlen < sizeof(resp))
|
|
return -ENOSPC;
|
|
return -ENOSPC;
|
|
|
|
|
|
@@ -2799,6 +2802,9 @@ int ib_uverbs_ex_destroy_flow(struct ib_uverbs_file *file,
|
|
struct ib_uobject *uobj;
|
|
struct ib_uobject *uobj;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
|
|
+ if (ucore->inlen < sizeof(cmd))
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
ret = ib_copy_from_udata(&cmd, ucore, sizeof(cmd));
|
|
ret = ib_copy_from_udata(&cmd, ucore, sizeof(cmd));
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|