|
@@ -1174,6 +1174,7 @@ ssize_t ib_uverbs_alloc_mw(struct ib_uverbs_file *file,
|
|
|
struct ib_uobject *uobj;
|
|
|
struct ib_pd *pd;
|
|
|
struct ib_mw *mw;
|
|
|
+ struct ib_udata udata;
|
|
|
int ret;
|
|
|
|
|
|
if (out_len < sizeof(resp))
|
|
@@ -1195,7 +1196,12 @@ ssize_t ib_uverbs_alloc_mw(struct ib_uverbs_file *file,
|
|
|
goto err_free;
|
|
|
}
|
|
|
|
|
|
- mw = pd->device->alloc_mw(pd, cmd.mw_type);
|
|
|
+ INIT_UDATA(&udata, buf + sizeof(cmd),
|
|
|
+ (unsigned long)cmd.response + sizeof(resp),
|
|
|
+ in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr),
|
|
|
+ out_len - sizeof(resp));
|
|
|
+
|
|
|
+ mw = pd->device->alloc_mw(pd, cmd.mw_type, &udata);
|
|
|
if (IS_ERR(mw)) {
|
|
|
ret = PTR_ERR(mw);
|
|
|
goto err_put;
|