From: Jason Gunthorpe <jgg@nvidia.com>
To: Md Haris Iqbal <haris.iqbal@ionos.com>
Cc: linux-rdma@vger.kernel.org, bvanassche@acm.org, leon@kernel.org,
jinpu.wang@ionos.com
Subject: Re: [PATCH v3 1/2] RDMA/rtrs-clt: Fix possible double free in error case
Date: Tue, 8 Feb 2022 12:48:35 -0400 [thread overview]
Message-ID: <20220208164835.GA180654@nvidia.com> (raw)
In-Reply-To: <20220202150855.445973-1-haris.iqbal@ionos.com>
On Wed, Feb 02, 2022 at 04:08:54PM +0100, Md Haris Iqbal wrote:
> Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt)
> to free memory. We shouldn't call kfree(clt) again, and we can't use the
> clt after kfree too.
>
> Replace device_register with device_initialize and device_add so that
> dev_set_name can be used appropriately.
>
> Move mutex_destroy to release function so it can be called in alloc_clt err
> path.
>
> Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
> Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
> ---
> drivers/infiniband/ulp/rtrs/rtrs-clt.c | 37 ++++++++++++++------------
> 1 file changed, 20 insertions(+), 17 deletions(-)
These patches don't apply, please resend them
Jason
next prev parent reply other threads:[~2022-02-08 16:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 15:08 [PATCH v3 1/2] RDMA/rtrs-clt: Fix possible double free in error case Md Haris Iqbal
2022-02-02 15:08 ` [PATCH 2/2] RDMA/rtrs-clt: Move free_permit from free_clt to rtrs_clt_close Md Haris Iqbal
2022-02-08 16:48 ` Jason Gunthorpe [this message]
2022-02-09 11:09 ` [PATCH v3 1/2] RDMA/rtrs-clt: Fix possible double free in error case Haris Iqbal
2022-02-09 12:00 ` Haris Iqbal
2022-02-09 12:25 ` Jason Gunthorpe
-- strict thread matches above, loose matches on Subject: below --
2022-02-09 15:14 Md Haris Iqbal
2022-02-16 18:04 ` 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=20220208164835.GA180654@nvidia.com \
--to=jgg@nvidia.com \
--cc=bvanassche@acm.org \
--cc=haris.iqbal@ionos.com \
--cc=jinpu.wang@ionos.com \
--cc=leon@kernel.org \
--cc=linux-rdma@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 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).