[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR18MB3182E3D4E7FD120FA1F6248BA1790@MN2PR18MB3182.namprd18.prod.outlook.com>
Date: Wed, 6 Nov 2019 08:48:16 +0000
From: Michal Kalderon <mkalderon@...vell.com>
To: Pan Bian <bianpan2016@....com>, Ariel Elior <aelior@...vell.com>,
"Doug Ledford" <dledford@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>
CC: "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [EXT] [PATCH] RDMA/qedr: fix potential use after free
> From: Pan Bian <bianpan2016@....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@....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@...vell.com>
Powered by blists - more mailing lists