Skip to content

Commit 486edfb

Browse files
committed
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: e7ff98a ("RDMA/cma: Constify path record, ib_cm_event, listen_id pointers") Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 4ce719f commit 486edfb

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎drivers/infiniband/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ config INFINIBAND_USER_ACCESS
3737

3838
config INFINIBAND_USER_ACCESS_UCM
3939
bool "Userspace CM (UCM, DEPRECATED)"
40-
depends on BROKEN
40+
depends on BROKEN || COMPILE_TEST
4141
depends on INFINIBAND_USER_ACCESS
4242
help
4343
The UCM module has known security flaws, which no one is

‎drivers/infiniband/core/ucm.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static struct ib_ucm_context *ib_ucm_ctx_alloc(struct ib_ucm_file *file)
207207
}
208208

209209
static void ib_ucm_event_req_get(struct ib_ucm_req_event_resp *ureq,
210-
struct ib_cm_req_event_param *kreq)
210+
const struct ib_cm_req_event_param *kreq)
211211
{
212212
ureq->remote_ca_guid = kreq->remote_ca_guid;
213213
ureq->remote_qkey = kreq->remote_qkey;
@@ -231,7 +231,7 @@ static void ib_ucm_event_req_get(struct ib_ucm_req_event_resp *ureq,
231231
}
232232

233233
static void ib_ucm_event_rep_get(struct ib_ucm_rep_event_resp *urep,
234-
struct ib_cm_rep_event_param *krep)
234+
const struct ib_cm_rep_event_param *krep)
235235
{
236236
urep->remote_ca_guid = krep->remote_ca_guid;
237237
urep->remote_qkey = krep->remote_qkey;
@@ -247,14 +247,14 @@ static void ib_ucm_event_rep_get(struct ib_ucm_rep_event_resp *urep,
247247
}
248248

249249
static void ib_ucm_event_sidr_rep_get(struct ib_ucm_sidr_rep_event_resp *urep,
250-
struct ib_cm_sidr_rep_event_param *krep)
250+
const struct ib_cm_sidr_rep_event_param *krep)
251251
{
252252
urep->status = krep->status;
253253
urep->qkey = krep->qkey;
254254
urep->qpn = krep->qpn;
255255
};
256256

257-
static int ib_ucm_event_process(struct ib_cm_event *evt,
257+
static int ib_ucm_event_process(const struct ib_cm_event *evt,
258258
struct ib_ucm_event *uvt)
259259
{
260260
void *info = NULL;
@@ -351,7 +351,7 @@ static int ib_ucm_event_process(struct ib_cm_event *evt,
351351
}
352352

353353
static int ib_ucm_event_handler(struct ib_cm_id *cm_id,
354-
struct ib_cm_event *event)
354+
const struct ib_cm_event *event)
355355
{
356356
struct ib_ucm_event *uevent;
357357
struct ib_ucm_context *ctx;

0 commit comments

Comments
 (0)