diff options
Diffstat (limited to 'drivers/infiniband/core/ucma.c')
-rw-r--r-- | drivers/infiniband/core/ucma.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 30467d10df91..8b5a934e1133 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
43 | #include <linux/sysctl.h> | 43 | #include <linux/sysctl.h> |
44 | #include <linux/module.h> | 44 | #include <linux/module.h> |
45 | #include <linux/nsproxy.h> | ||
45 | 46 | ||
46 | #include <rdma/rdma_user_cm.h> | 47 | #include <rdma/rdma_user_cm.h> |
47 | #include <rdma/ib_marshall.h> | 48 | #include <rdma/ib_marshall.h> |
@@ -472,7 +473,8 @@ static ssize_t ucma_create_id(struct ucma_file *file, const char __user *inbuf, | |||
472 | return -ENOMEM; | 473 | return -ENOMEM; |
473 | 474 | ||
474 | ctx->uid = cmd.uid; | 475 | ctx->uid = cmd.uid; |
475 | ctx->cm_id = rdma_create_id(ucma_event_handler, ctx, cmd.ps, qp_type); | 476 | ctx->cm_id = rdma_create_id(current->nsproxy->net_ns, |
477 | ucma_event_handler, ctx, cmd.ps, qp_type); | ||
476 | if (IS_ERR(ctx->cm_id)) { | 478 | if (IS_ERR(ctx->cm_id)) { |
477 | ret = PTR_ERR(ctx->cm_id); | 479 | ret = PTR_ERR(ctx->cm_id); |
478 | goto err1; | 480 | goto err1; |
@@ -1211,7 +1213,6 @@ static int ucma_set_ib_path(struct ucma_context *ctx, | |||
1211 | return -EINVAL; | 1213 | return -EINVAL; |
1212 | 1214 | ||
1213 | memset(&sa_path, 0, sizeof(sa_path)); | 1215 | memset(&sa_path, 0, sizeof(sa_path)); |
1214 | sa_path.vlan_id = 0xffff; | ||
1215 | 1216 | ||
1216 | ib_sa_unpack_path(path_data->path_rec, &sa_path); | 1217 | ib_sa_unpack_path(path_data->path_rec, &sa_path); |
1217 | ret = rdma_set_ib_paths(ctx->cm_id, &sa_path, 1); | 1218 | ret = rdma_set_ib_paths(ctx->cm_id, &sa_path, 1); |