diff options
author | Pan Bian <bianpan2016@163.com> | 2019-11-06 07:23:54 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-11-14 16:47:18 +0100 |
commit | 960657b732e1ce21b07be5ab48a7ad3913d72ba4 (patch) | |
tree | 6b0adb27c2b70b6ed23ba5d52bb5cd28277cbc8c /drivers/infiniband | |
parent | RDMA/srpt: Report the SCSI residual to the initiator (diff) | |
download | linux-960657b732e1ce21b07be5ab48a7ad3913d72ba4.tar.xz linux-960657b732e1ce21b07be5ab48a7ad3913d72ba4.zip |
RDMA/qedr: Fix potential use after free
Move the release operation after error log to avoid possible use after
free.
Link: https://lore.kernel.org/r/1573021434-18768-1-git-send-email-bianpan2016@163.com
Signed-off-by: Pan Bian <bianpan2016@163.com>
Acked-by: Michal KalderonĀ <michal.kalderon@marvell.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/qedr/qedr_iw_cm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c b/drivers/infiniband/hw/qedr/qedr_iw_cm.c index 5e9732990be5..d3c13f4b136e 100644 --- a/drivers/infiniband/hw/qedr/qedr_iw_cm.c +++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c @@ -481,10 +481,10 @@ qedr_addr6_resolve(struct qedr_dev *dev, if ((!dst) || dst->error) { if (dst) { - dst_release(dst); DP_ERR(dev, "ip6_route_output returned dst->error = %d\n", dst->error); + dst_release(dst); } return -EINVAL; } |