aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2016-06-23 14:50:25 +0100
committerDavid S. Miller <davem@davemloft.net>2016-06-27 10:40:57 -0400
commitbf7afb29d545a6875fa44e17ddd23398e3dc30de (patch)
tree26af32aadf4e16da795e00c2d598bd8efbff593c /net
parentphy: generate swphy registers on the fly (diff)
downloadlinux-dev-bf7afb29d545a6875fa44e17ddd23398e3dc30de.tar.xz
linux-dev-bf7afb29d545a6875fa44e17ddd23398e3dc30de.zip
phy: improve safety of fixed-phy MII register reading
There is no prevention of a concurrent call to both fixed_mdio_read() and fixed_phy_update_state(), which can result in the state being modified while it's being inspected. Fix this by using a seqcount to detect modifications, and memcpy()ing the state. We remain slightly naughty here, calling link_update() and updating the link status within the read-side loop - which would need rework of the design to change. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions