OSDN Git Service

RDMA/iw_cxgb4: Fix the unchecked ep dereference
authorRaju Rangoju <rajur@chelsio.com>
Fri, 11 Jan 2019 14:57:18 +0000 (20:27 +0530)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 15 Jan 2019 22:51:46 +0000 (15:51 -0700)
commit3352976c892301fd576a2e9ff0ac7337b2e2ca48
treec8e7ff48e7f34ce6dbc9f065bbd3a568f0a33002
parent5fc01fb846bce8fa6d5f95e2625b8ce0f8e86810
RDMA/iw_cxgb4: Fix the unchecked ep dereference

The patch 944661dd97f4: "RDMA/iw_cxgb4: atomically lookup ep and get a
reference" from May 6, 2016, leads to the following Smatch complaint:

    drivers/infiniband/hw/cxgb4/cm.c:2953 terminate()
    error: we previously assumed 'ep' could be null (see line 2945)

Fixes: 944661dd97f4 ("RDMA/iw_cxgb4: atomically lookup ep and get a reference")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Raju Rangoju <rajur@chelsio.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/cxgb4/cm.c