From: Jason Gunthorpe <jgg@nvidia.com>
To: 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: Wed, 9 Feb 2022 08:25:10 -0400 [thread overview]
Message-ID: <20220209122510.GQ4160@nvidia.com> (raw)
In-Reply-To: <CAJpMwyiU_yxgQXugRMF+ifGz3mH=GNherqKDCMVXax6jUp6hdA@mail.gmail.com>
On Wed, Feb 09, 2022 at 01:00:32PM +0100, Haris Iqbal wrote:
> On Tue, Feb 8, 2022 at 5:48 PM Jason Gunthorpe <jgg@nvidia.com> wrote:
> >
> > 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
>
> Hi Jason,
>
> I tried these 2 patches over wip/jgg-for-next (commit
> 2f1b2820b546c1eef07d15ed73db4177c0cf6d46) and it applies. Can you
> check once more if there is some other issue? Thanks.
It applied for you because you have the right 3 way information, I
don't. You need to generate and send patches against clean trees
Jason
next prev parent reply other threads:[~2022-02-09 12:25 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 ` [PATCH v3 1/2] RDMA/rtrs-clt: Fix possible double free in error case Jason Gunthorpe
2022-02-09 11:09 ` Haris Iqbal
2022-02-09 12:00 ` Haris Iqbal
2022-02-09 12:25 ` Jason Gunthorpe [this message]
-- 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=20220209122510.GQ4160@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).