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:	Thu, 22 Aug 2013 17:38:30 +0200
From:	boris brezillon <b.brezillon@...rkiz.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	"David S. Miller" <davem@...emloft.net>,
	Mark Brown <broonie@...nel.org>,
	Nick Bowler <nbowler@...iptictech.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC PATCH] phylib: mdio: handle register/unregister/register
 sequence

On 22/08/2013 17:27, Greg Kroah-Hartman wrote:
> On Thu, Aug 22, 2013 at 02:33:56PM +0200, Boris BREZILLON wrote:
>> Hello,
>>
>> This patch is a proposal to support the register/unregister/register
>> sequence on a given mdio bus.
>>
>> I use the register/unregister/register sequence to add a fallback when the
>> of_mdiobus_register (this function calls mdiobus_register with phy_mask
>> set to ~0) does not register any phy device (because the device tree does
>> not define any phy).
>> In this case I call mdiobus_unregister and then call mdiobus_register with
>> a phy_mask set to 0 to trigger a full mdio bus scan.
>>
>> I'm not sure this is the right way to do it (this is why I added RFC in the
>> subject).
>>
>> Could someone help me figuring out what I should use to implement my fallback ?
>>
>> 1) use the register/unregister/register sequence
> That will not work.  Well, you might think it would work, but then
> things randomly start breaking later on.  Try it with the
> KOBJECT_DELAYED_DESTROY build option in linux-next, and watch things go
> "boom" :)
>
> The rule is, you should never register a kobject/struct device that you
> have previously unregistered before, as you really don't know if
> unregistering has finished or not.

Thanks for your answer.

>
> sorry,
>
> greg k-h

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ