Skip to content

Commit 4dd81e8

Browse files
Sean Heftyrolandd
authored andcommitted
RDMA/cma: QP type check on received REQs should be AND not OR
Change || check to the intended && when checking the QP type in a received connection request against the listening endpoint. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent ae501be commit 4dd81e8

File tree

1 file changed

+1
-1
lines changed
  • drivers/infiniband/core

1 file changed

+1
-1
lines changed

drivers/infiniband/core/cma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ static void cma_set_req_event_data(struct rdma_cm_event *event,
11841184

11851185
static int cma_check_req_qp_type(struct rdma_cm_id *id, struct ib_cm_event *ib_event)
11861186
{
1187-
return (((ib_event->event == IB_CM_REQ_RECEIVED) ||
1187+
return (((ib_event->event == IB_CM_REQ_RECEIVED) &&
11881188
(ib_event->param.req_rcvd.qp_type == id->qp_type)) ||
11891189
((ib_event->event == IB_CM_SIDR_REQ_RECEIVED) &&
11901190
(id->qp_type == IB_QPT_UD)) ||

0 commit comments

Comments
 (0)