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] [day] [month] [year] [list]
Date:   Tue, 28 Apr 2020 11:12:47 +0800
From:   Dejin Zheng <zhengdejin5@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>, jes@...ined-monkey.org,
        linux-acenic@...site.dk, netdev <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net v1] net: acenic: fix an issue about leak related
 system resources

On Mon, Apr 27, 2020 at 01:40:02PM +0300, Andy Shevchenko wrote:
> On Sat, Apr 25, 2020 at 4:40 PM Dejin Zheng <zhengdejin5@...il.com> wrote:
> >
> > the function ace_allocate_descriptors() and ace_init() can fail in
> > the acenic_probe_one(), The related system resources were not
> > released then. so change the error handling to fix it.
> 
> ...
> 
> > @@ -568,7 +568,7 @@ static int acenic_probe_one(struct pci_dev *pdev,
> >  #endif
> >
> >         if (ace_allocate_descriptors(dev))
> > -               goto fail_free_netdev;
> > +               goto fail_uninit;
> 
> Not sure.
> The code is quite old and requires a lot of refactoring.
> 
> Briefly looking the error path there is quite twisted.
>
> > @@ -580,7 +580,7 @@ static int acenic_probe_one(struct pci_dev *pdev,
> >  #endif
> >
> >         if (ace_init(dev))
> > -               goto fail_free_netdev;
> > +               goto fail_uninit;
> 
> This change seems incorrect, the ace_init() calls ace_init_cleanup() on error.
> So, your change makes it call the cleanup() twice.
> 
Hi Andy:

Yes, this code is quite old, and There are also some mistakes in my
patch, abandon this commit first. Thanks!

BR,
Dejin
> -- 
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ