From: Pan Bian <bianpan2016@163.com>
To: Michal Kalderon <mkalderon@marvell.com>,
Ariel Elior <aelior@marvell.com>,
Doug Ledford <dledford@redhat.com>,
Jason Gunthorpe <jgg@ziepe.ca>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Pan Bian <bianpan2016@163.com>
Subject: [PATCH] RDMA/qedr: fix potential use after free
Date: Wed, 6 Nov 2019 14:23:54 +0800 [thread overview]
Message-ID: <1573021434-18768-1-git-send-email-bianpan2016@163.com> (raw)
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
next reply other threads:[~2019-11-06 6:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 6:23 Pan Bian [this message]
2019-11-06 8:48 ` [EXT] " Michal Kalderon
2019-11-14 15:53 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1573021434-18768-1-git-send-email-bianpan2016@163.com \
--to=bianpan2016@163.com \
--cc=aelior@marvell.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mkalderon@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®