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]
Message-ID: <20160517131542.GA25024@lunn.ch>
Date:	Tue, 17 May 2016 15:15:42 +0200
From:	Andrew Lunn <andrew@...n.ch>
To:	Rabin Vincent <rabin.vincent@...s.com>
Cc:	"David S. Miller" <davem@...emloft.net>, f.fainelli@...il.com,
	netdev@...r.kernel.org, Rabin Vincent <rabinv@...s.com>
Subject: Re: [PATCHv2] phy: fix crash in fixed_phy_add()

On Tue, May 17, 2016 at 11:01:50AM +0200, Rabin Vincent wrote:

Hi Rabin

Thanks for v2. This is a lot better

> @@ -314,6 +315,9 @@ struct phy_device *fixed_phy_register(unsigned int irq,
>  	int phy_addr;
>  	int ret;
>  
> +	if (!fmb->mii_bus)
> +		return ERR_PTR(-EPROBE_DEFER);

Better still:

       if (!fmb->mii_bus || fmb->mii_bus->state != MDIOBUS_REGISTERED)
		return ERR_PTR(-EPROBE_DEFER);

Thanks
	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ