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:	Thu, 11 Feb 2016 16:48:51 +0100
From:	Andrew Lunn <andrew@...n.ch>
To:	Sascha Hauer <s.hauer@...gutronix.de>
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Guenter Roeck <linux@...ck-us.net>
Subject: Re: [PATCH 2/2] net: dsa: remove phy_disconnect from error path

On Thu, Feb 11, 2016 at 11:44:49AM +0100, Sascha Hauer wrote:
> The phy has not been initialized, disconnecting it in the error
> path results in a NULL pointer exception. Drop the phy_disconnect
> from the error path.
> 
> Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>

Hi Sascha

The fix looks correct, since the phy should be bound to the device in
the following dsa_slave_phy_setup() call.

I'm not sure if Neil also fixed this...

Anyway,

Reviewed-by: Andrew Lunn <andrew@...n.ch>

     Andrew



> ---
>  net/dsa/slave.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index 40b9ca7..91e3b2f 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
> @@ -1194,7 +1194,6 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent,
>  	if (ret) {
>  		netdev_err(master, "error %d registering interface %s\n",
>  			   ret, slave_dev->name);
> -		phy_disconnect(p->phy);
>  		ds->ports[port] = NULL;
>  		free_netdev(slave_dev);
>  		return ret;
> -- 
> 2.7.0.rc3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ