mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
RDMA/cma: Only call cma_save_ib_info() for CM REQs
Calling cma_save_ib_info() for CM SIDR REQs results in a crash accessing an invalid path record pointer. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
This commit is contained in:
parent
e511d1ae16
commit
5eb695c177
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue