Message ID | 1517885001-17268-1-git-send-email-guanglei.li@oracle.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
Series | [v3] RDS: IB: Fix null pointer issue | expand |
From: Guanglei Li <guanglei.li@oracle.com> Date: Tue, 6 Feb 2018 10:43:21 +0800 > Scenario: > 1. Port down and do fail over > 2. Ap do rds_bind syscall ... > PID: 45659 PID: 47039 > rds_ib_laddr_check > /* create id_priv with a null event_handler */ > rdma_create_id > rdma_bind_addr > cma_acquire_dev > /* add id_priv to cma_dev->id_list */ > cma_attach_to_dev > cma_ndev_work_handler > /* event_hanlder is null */ > id_priv->id.event_handler > > Signed-off-by: Guanglei Li <guanglei.li@oracle.com> > Signed-off-by: Honglei Wang <honglei.wang@oracle.com> > Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com> > Reviewed-by: Yanjun Zhu <yanjun.zhu@oracle.com> > Reviewed-by: Leon Romanovsky <leonro@mellanox.com> > Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> > Acked-by: Doug Ledford <dledford@redhat.com> Applied, thanks.
diff --git a/net/rds/ib.c b/net/rds/ib.c index b2a5067..ff0c980 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -345,7 +345,8 @@ static int rds_ib_laddr_check(struct net *net, __be32 addr) /* Create a CMA ID and try to bind it. This catches both * IB and iWARP capable NICs. */ - cm_id = rdma_create_id(&init_net, NULL, NULL, RDMA_PS_TCP, IB_QPT_RC); + cm_id = rdma_create_id(&init_net, rds_rdma_cm_event_handler, + NULL, RDMA_PS_TCP, IB_QPT_RC); if (IS_ERR(cm_id)) return PTR_ERR(cm_id);