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, 01 Mar 2018 13:26:41 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     richardcochran@...il.com
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        andrew@...n.ch, f.fainelli@...il.com, linux@....linux.org.uk
Subject: Re: [PATCH net-next] net: phylink: Remove redundant netdev.phydev
 assignment

From: Richard Cochran <richardcochran@...il.com>
Date: Fri, 23 Feb 2018 07:25:46 -0800

> As a part of working on MII time stamping infrastructure, I was trying
> to figure out how netdev->phydev gets assigned, and I stumbled across
> this.  Ever since the new phylink code came in, the field is assigned
> twice.
> 
> The function, phylink_connect_phy(), calls
> 
> 	phy_attach_direct()
> 	phylink_bringup_phy()
> 
> and phy_attach_direct() sets
> 
> 	dev->phydev = phydev;
> 
> but phylink_bringup_phy() then sets the same field again:
> 
> 	pl->netdev->phydev = phy;
> 
> Similarly, the function, phylink_of_phy_connect(), calls
> 
> 	of_phy_attach()
> 		phy_attach_direct()
> 	phylink_bringup_phy()
> 
> The removal code is also duplicated:
> 
> phylink_disconnect_phy()
> 	pl->netdev->phydev = NULL;
> 	phy_disconnect()
> 		phy_detach()
> 			phydev->attached_dev->phydev = NULL;
> 
> This patch removes the redundant assignments, restricting manipulation
> of the netdev.phydev field to phy_attach_direct() and phy_detach().
> 
> Signed-off-by: Richard Cochran <richardcochran@...il.com>

Applied, thanks Richard.
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ