Commit 486edfb1 authored by Jason Gunthorpe's avatar Jason Gunthorpe

IB/ucm: Fix compiling ucm.c

Even though this interface is marked CONFIG_BROKEN we still expect it to
compile, at least until we delete it completely.

Also mark INFINIBAND_USER_ACCESS_UCM with COMPILE_TEST so these situations
can be detected.

Fixes: e7ff98ae ("RDMA/cma: Constify path record, ib_cm_event, listen_id pointers")
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 4ce719f8
...@@ -37,7 +37,7 @@ config INFINIBAND_USER_ACCESS ...@@ -37,7 +37,7 @@ config INFINIBAND_USER_ACCESS
config INFINIBAND_USER_ACCESS_UCM config INFINIBAND_USER_ACCESS_UCM
bool "Userspace CM (UCM, DEPRECATED)" bool "Userspace CM (UCM, DEPRECATED)"
depends on BROKEN depends on BROKEN || COMPILE_TEST
depends on INFINIBAND_USER_ACCESS depends on INFINIBAND_USER_ACCESS
help help
The UCM module has known security flaws, which no one is The UCM module has known security flaws, which no one is
......
...@@ -207,7 +207,7 @@ static struct ib_ucm_context *ib_ucm_ctx_alloc(struct ib_ucm_file *file) ...@@ -207,7 +207,7 @@ static struct ib_ucm_context *ib_ucm_ctx_alloc(struct ib_ucm_file *file)
} }
static void ib_ucm_event_req_get(struct ib_ucm_req_event_resp *ureq, static void ib_ucm_event_req_get(struct ib_ucm_req_event_resp *ureq,
struct ib_cm_req_event_param *kreq) const struct ib_cm_req_event_param *kreq)
{ {
ureq->remote_ca_guid = kreq->remote_ca_guid; ureq->remote_ca_guid = kreq->remote_ca_guid;
ureq->remote_qkey = kreq->remote_qkey; ureq->remote_qkey = kreq->remote_qkey;
...@@ -231,7 +231,7 @@ static void ib_ucm_event_req_get(struct ib_ucm_req_event_resp *ureq, ...@@ -231,7 +231,7 @@ static void ib_ucm_event_req_get(struct ib_ucm_req_event_resp *ureq,
} }
static void ib_ucm_event_rep_get(struct ib_ucm_rep_event_resp *urep, static void ib_ucm_event_rep_get(struct ib_ucm_rep_event_resp *urep,
struct ib_cm_rep_event_param *krep) const struct ib_cm_rep_event_param *krep)
{ {
urep->remote_ca_guid = krep->remote_ca_guid; urep->remote_ca_guid = krep->remote_ca_guid;
urep->remote_qkey = krep->remote_qkey; urep->remote_qkey = krep->remote_qkey;
...@@ -247,14 +247,14 @@ static void ib_ucm_event_rep_get(struct ib_ucm_rep_event_resp *urep, ...@@ -247,14 +247,14 @@ static void ib_ucm_event_rep_get(struct ib_ucm_rep_event_resp *urep,
} }
static void ib_ucm_event_sidr_rep_get(struct ib_ucm_sidr_rep_event_resp *urep, static void ib_ucm_event_sidr_rep_get(struct ib_ucm_sidr_rep_event_resp *urep,
struct ib_cm_sidr_rep_event_param *krep) const struct ib_cm_sidr_rep_event_param *krep)
{ {
urep->status = krep->status; urep->status = krep->status;
urep->qkey = krep->qkey; urep->qkey = krep->qkey;
urep->qpn = krep->qpn; urep->qpn = krep->qpn;
}; };
static int ib_ucm_event_process(struct ib_cm_event *evt, static int ib_ucm_event_process(const struct ib_cm_event *evt,
struct ib_ucm_event *uvt) struct ib_ucm_event *uvt)
{ {
void *info = NULL; void *info = NULL;
...@@ -351,7 +351,7 @@ static int ib_ucm_event_process(struct ib_cm_event *evt, ...@@ -351,7 +351,7 @@ static int ib_ucm_event_process(struct ib_cm_event *evt,
} }
static int ib_ucm_event_handler(struct ib_cm_id *cm_id, static int ib_ucm_event_handler(struct ib_cm_id *cm_id,
struct ib_cm_event *event) const struct ib_cm_event *event)
{ {
struct ib_ucm_event *uevent; struct ib_ucm_event *uevent;
struct ib_ucm_context *ctx; struct ib_ucm_context *ctx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment