Re: [PATCH v3 1/2] RDMA/rtrs-clt: Fix possible double free in error case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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@xxxxxxxxx>
> > > Reviewed-by: Jack Wang <jinpu.wang@xxxxxxxxx>
> > >  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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux