lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACZ4nhtek5W2Sp2AUP546RGHmeAxwZ-8x6no3PNVPigTWFJLPw@mail.gmail.com>
Date:   Mon, 23 Jan 2023 23:08:30 -0800
From:   Ajit Khaparde <ajit.khaparde@...adcom.com>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        andrew.gospodarek@...adcom.com, davem@...emloft.net,
        edumazet@...gle.com, jgg@...pe.ca, linux-kernel@...r.kernel.org,
        linux-rdma@...r.kernel.org, michael.chan@...adcom.com,
        netdev@...r.kernel.org, pabeni@...hat.com,
        selvin.xavier@...adcom.com
Subject: Re: [PATCH net-next v8 1/8] bnxt_en: Add auxiliary driver support

On Mon, Jan 23, 2023 at 10:53 PM Leon Romanovsky <leon@...nel.org> wrote:
>
> On Mon, Jan 23, 2023 at 10:33:05PM -0800, Jakub Kicinski wrote:
> > On Thu, 19 Jan 2023 22:05:28 -0800 Ajit Khaparde wrote:
> > > @@ -13212,6 +13214,7 @@ static void bnxt_remove_one(struct pci_dev *pdev)
> > >     kfree(bp->rss_indir_tbl);
> > >     bp->rss_indir_tbl = NULL;
> > >     bnxt_free_port_stats(bp);
> > > +   bnxt_aux_priv_free(bp);
> > >     free_netdev(dev);
> >
> > You're still freeing the memory in which struct device sits regardless
> > of its reference count.
>
> BTW, Ajit does the same wrong kfree in bnxt_rdma_aux_device_add() too.
I will address this in the next version. Thanks again.

Thanks
Ajit
> +       ret = auxiliary_device_add(aux_dev);
> +       if (ret)
> +               goto aux_dev_uninit;
> +
> ...
> +aux_dev_uninit:
> +       auxiliary_device_uninit(aux_dev);
> +free_edev:
> +       kfree(edev); <----- wrong
> +       bp->edev = NULL;
>
> Thanks

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4218 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ