* [PATCH] RDMA/qedr: fix potential use after free
@ 2019-11-06 6:23 Pan Bian
2019-11-06 8:48 ` [EXT] " Michal Kalderon
2019-11-14 15:53 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Pan Bian @ 2019-11-06 6:23 UTC (permalink / raw)
To: Michal Kalderon, Ariel Elior, Doug Ledford, Jason Gunthorpe
Cc: linux-rdma, linux-kernel, Pan Bian
Move the release operation after error log to avoid possible use after
free.
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
drivers/infiniband/hw/qedr/qedr_iw_cm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
index 22881d4442b9..eedc32b72ff2 100644
--- a/drivers/infiniband/hw/qedr/qedr_iw_cm.c
+++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
@@ -451,10 +451,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;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [EXT] [PATCH] RDMA/qedr: fix potential use after free
2019-11-06 6:23 [PATCH] RDMA/qedr: fix potential use after free Pan Bian
@ 2019-11-06 8:48 ` Michal Kalderon
2019-11-14 15:53 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Michal Kalderon @ 2019-11-06 8:48 UTC (permalink / raw)
To: Pan Bian, Ariel Elior, Doug Ledford, Jason Gunthorpe
Cc: linux-rdma, linux-kernel
> From: Pan Bian <bianpan2016@163.com>
> Sent: Wednesday, November 6, 2019 8:24 AM
>
> External Email
>
> ----------------------------------------------------------------------
> Move the release operation after error log to avoid possible use after free.
>
> Signed-off-by: Pan Bian <bianpan2016@163.com>
> ---
> drivers/infiniband/hw/qedr/qedr_iw_cm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c
> b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
> index 22881d4442b9..eedc32b72ff2 100644
> --- a/drivers/infiniband/hw/qedr/qedr_iw_cm.c
> +++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
> @@ -451,10 +451,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;
> }
> --
> 2.7.4
Thanks,
Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/qedr: fix potential use after free
2019-11-06 6:23 [PATCH] RDMA/qedr: fix potential use after free Pan Bian
2019-11-06 8:48 ` [EXT] " Michal Kalderon
@ 2019-11-14 15:53 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2019-11-14 15:53 UTC (permalink / raw)
To: Pan Bian
Cc: Michal Kalderon, Ariel Elior, Doug Ledford, linux-rdma, linux-kernel
On Wed, Nov 06, 2019 at 02:23:54PM +0800, Pan Bian wrote:
> Move the release operation after error log to avoid possible use after
> free.
>
> Signed-off-by: Pan Bian <bianpan2016@163.com>
> ---
> drivers/infiniband/hw/qedr/qedr_iw_cm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-14 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 6:23 [PATCH] RDMA/qedr: fix potential use after free Pan Bian
2019-11-06 8:48 ` [EXT] " Michal Kalderon
2019-11-14 15:53 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).