Skip to content

Commit 660579f

Browse files
linuxhuihanBrian Maly
authored andcommitted
RDS: IB: Fix null pointer issue
The id_priv which have a null event_handler setting, is created when call rdma_create_id function as one step of rds_bind,and then the id_priv will be destroyed. There is a time window it is attached to the id_list of cma_dev. At the same time window, fail over got it from list and send perform event handler.(Porting this fix from UEK2 to UEK3) Scenario: 1. Port down and do fail over 2. Ap do rds_bind syscall PID: 47039 TASK: ffff89887e2fe640 CPU: 47 COMMAND: "kworker/u:6" [exception RIP: unknown or invalid address] RIP: 0000000000000000 RSP: ffff898e35f15dc8 RFLAGS: 00010282 RAX: 00000000fffffffe RBX: ffff889b77f6fc00 RCX:ffffffff81c99d88 RDX: 0000000000000000 RSI: ffff896019ee08e8 RDI:ffff889b77f6fc00 RBP: ffff898e35f15df0 R8: ffff896019ee08c8 R9:0000000000000000 R10: 0000000000000400 R11: 0000000000000000 R12:ffff896019ee08c0 R13: ffff889b77f6fe68 R14: ffffffff81c99d80 R15: ffffffffa022a1e0 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 Orabug: 27843171 Signed-off-by: hui.han <[email protected]> Signed-off-by: Guanglei Li <[email protected]> Signed-off-by: Honglei Wang <[email protected]> Reviewed-by: Junxiao Bi <[email protected]> Reviewed-by: Yanjun Zhu <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Acked-by: Doug Ledford <[email protected]> Signed-off-by: David S. Miller <[email protected]> (cherry picked from commit 2c0aa08) Reviewed-by: Håkon Bugge <[email protected]> Signed-off-by: Brian Maly <[email protected]>
1 parent 0e0c477 commit 660579f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/rds/ib.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@ static int rds_ib_laddr_check(__be32 addr)
418418
/* Create a CMA ID and try to bind it. This catches both
419419
* IB and iWARP capable NICs.
420420
*/
421-
cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP, IB_QPT_RC);
421+
cm_id = rdma_create_id(rds_rdma_cm_event_handler,
422+
NULL, RDMA_PS_TCP, IB_QPT_RC);
422423
if (IS_ERR(cm_id))
423424
return -EADDRNOTAVAIL;
424425

0 commit comments

Comments
 (0)