- Subject: [PATCH] rdma/cm: QP type check on received REQs should be AND not OR
- From: "Hefty, Sean" <sean.hefty@xxxxxxxxx>
- Date: Thu, 14 Jun 2012 20:49:09 +0000
- Accept-language: en-US
- Thread-index: Ac1Kbvr1G7sl3zN+R9ST2c3KeFgWBg==
- Thread-topic: [PATCH] rdma/cm: QP type check on received REQs should be AND not OR
Change || check to && when checking the QP type in a received
connection request against the listening endpoint.
Signed-off-by: Sean Hefty <sean.hefty@xxxxxxxxx>
---
Found by code inspection.
drivers/infiniband/core/cma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 467f2fb..41f3351 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1189,7 +1189,7 @@ static void cma_set_req_event_data(struct rdma_cm_event *event,
static int cma_check_req_qp_type(struct rdma_cm_id *id, struct ib_cm_event *ib_event)
{
- return (((ib_event->event == IB_CM_REQ_RECEIVED) ||
+ return (((ib_event->event == IB_CM_REQ_RECEIVED) &&
(ib_event->param.req_rcvd.qp_type == id->qp_type)) ||
((ib_event->event == IB_CM_SIDR_REQ_RECEIVED) &&
(id->qp_type == IB_QPT_UD)) ||
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Home]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]