projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e511d1a
)
RDMA/cma: Only call cma_save_ib_info() for CM REQs
author
Sean Hefty
<sean.hefty@intel.com>
Wed, 24 Jul 2013 22:06:09 +0000
(15:06 -0700)
committer
Roland Dreier
<roland@purestorage.com>
Wed, 31 Jul 2013 07:50:44 +0000
(
00:50
-0700)
Calling cma_save_ib_info() for CM SIDR REQs results in a crash
accessing an invalid path record pointer.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/cma.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/infiniband/core/cma.c
b/drivers/infiniband/core/cma.c
index 431465563364035b4bb71f2bdfc67e1bdf072880..7c0f9535fb7d443bf2c4b1647b3494816292020a 100644
(file)
--- a/
drivers/infiniband/core/cma.c
+++ b/
drivers/infiniband/core/cma.c
@@
-879,7
+879,8
@@
static int cma_save_net_info(struct rdma_cm_id *id, struct rdma_cm_id *listen_id
{
struct cma_hdr *hdr;
- if (listen_id->route.addr.src_addr.ss_family == AF_IB) {
+ if ((listen_id->route.addr.src_addr.ss_family == AF_IB) &&
+ (ib_event->event == IB_CM_REQ_RECEIVED)) {
cma_save_ib_info(id, listen_id, ib_event->param.req_rcvd.primary_path);
return 0;
}