diff options
author | Pan Bian <[email protected]> | 2019-11-06 14:23:54 +0800 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2019-11-14 11:47:18 -0400 |
commit | 960657b732e1ce21b07be5ab48a7ad3913d72ba4 (patch) | |
tree | 6b0adb27c2b70b6ed23ba5d52bb5cd28277cbc8c | |
parent | e88982ad1bb12db699de96fbc07096359ef6176c (diff) |
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/[email protected]
Signed-off-by: Pan Bian <[email protected]>
Acked-by: Michal KalderonĀ <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
-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; } |