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]
Date:   Tue, 28 Sep 2021 16:52:07 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     Pavel Skripkin <paskripkin@...il.com>,
        Yanfei Xu <yanfei.xu@...driver.com>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        andrew@...n.ch, hkallweit1@...il.com, davem@...emloft.net,
        kuba@...nel.org, p.zabel@...gutronix.de,
        syzbot+398e7dc692ddbbb4cfec@...kaller.appspotmail.com,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        Dongliang Mu <mudongliangabcd@...il.com>
Subject: Re: [PATCH] net: mdiobus: Fix memory leak in __mdiobus_register

On Tue, Sep 28, 2021 at 01:58:00PM +0100, Russell King (Oracle) wrote:
>
> This thread seems to be getting out of hand.

The thread was closed.  We need to revert Yanfei's patch and apply
Pavel's patch.  He's going to resend.

> So, I would suggest a simple fix is to set bus->state to
> MDIOBUS_UNREGISTERED immediately _after_ the successful
> device_register().

Not after.  It has to be set to MDIOBUS_UNREGISTERED if device_register()
fails, otherwise there will still be a leak.

Adding a comment is a good idea.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ