projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e88982a
)
RDMA/qedr: Fix potential use after free
author
Pan Bian
<bianpan2016@163.com>
Wed, 6 Nov 2019 06:23:54 +0000
(14:23 +0800)
committer
Jason Gunthorpe
<jgg@mellanox.com>
Thu, 14 Nov 2019 15:47:18 +0000
(11:47 -0400)
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>
drivers/infiniband/hw/qedr/qedr_iw_cm.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/qedr/qedr_iw_cm.c
b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
index
5e97329
..
d3c13f4
100644
(file)
--- 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;
}