From: Leon Romanovsky <leon@kernel.org>
To: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Cc: sagi@grimberg.me, dledford@redhat.com, jgg@ziepe.ca,
linux-rdma@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] infiniband: Fix a use after free in isert_connect_request
Date: Wed, 24 Mar 2021 11:21:30 +0200 [thread overview]
Message-ID: <YFsEmqAdFNxEYK7J@unreal> (raw)
In-Reply-To: <20210322161325.7491-1-lyl2019@mail.ustc.edu.cn>
On Mon, Mar 22, 2021 at 09:13:25AM -0700, Lv Yunlong wrote:
> The device is got by isert_device_get() with refcount is 1,
> and is assigned to isert_conn by isert_conn->device = device.
> When isert_create_qp() failed, device will be freed with
> isert_device_put().
>
> Later, the device is used in isert_free_login_buf(isert_conn)
> by the isert_conn->device->ib_device statement. This patch
> free the device in the correct order.
>
> Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
> ---
> drivers/infiniband/ulp/isert/ib_isert.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2021-03-24 9:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 16:13 [PATCH v2] infiniband: Fix a use after free in isert_connect_request Lv Yunlong
2021-03-23 0:47 ` Sagi Grimberg
2021-03-24 9:21 ` Leon Romanovsky [this message]
2021-03-25 10:56 ` Max Gurtovoy
2021-03-26 17:26 ` 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=YFsEmqAdFNxEYK7J@unreal \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lyl2019@mail.ustc.edu.cn \
--cc=sagi@grimberg.me \
--cc=target-devel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.