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: <872f3980-9faa-718f-3260-9e4b22946140@gmail.com>
Date:   Fri, 12 May 2017 15:52:25 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     David Miller <davem@...emloft.net>, julia.lawall@...6.fr,
        jon.mason@...adcom.com
Cc:     netdev@...r.kernel.org, jon.mason@...adcom.com, andrew@...n.ch,
        kbuild-all@...org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mdio: mux: fix device_node_continue.cocci warnings

On 05/12/2017 09:22 AM, David Miller wrote:
> From: Julia Lawall <julia.lawall@...6.fr>
> Date: Fri, 12 May 2017 22:54:23 +0800 (SGT)
> 
>> Device node iterators put the previous value of the index variable, so an
>> explicit put causes a double put.
>  ...
>> @@ -169,7 +169,6 @@ int mdio_mux_init(struct device *dev,
>>  		if (r) {
>>  			mdiobus_free(cb->mii_bus);
>>  			devm_kfree(dev, cb);
>> -			of_node_put(child_bus_node);
>>  		} else {
> 
> I think we're instead simply missing a break; statement here.

It's kind of questionable, if we have an error initializing one of our
child MDIO bus controller (child from the perspective of the MDIO mux,
boy this is getting complicated...), should we keep on going, or should
we abort entirely and rollback what we have successfully registered?

I don't think Julia's patch makes thing worse, in that if we had to
rollback, we would not be doing this correctly now anyway.

Jon, what do you think?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ