From: Russell King Date: Tue, 25 Aug 2015 08:49:47 +0000 (+0100) Subject: net: phy: add locking to phy_read_mmd_indirect()/phy_write_mmd_indirect() X-Git-Tag: omap-for-v4.3/fixes-merge-window~53^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05a7f582be961824d62a7f4a817f3783148b5f8a;p=pandora-kernel.git net: phy: add locking to phy_read_mmd_indirect()/phy_write_mmd_indirect() The phy layer is missing locking for the above two functions - it has been observed that two threads (userspace and the phy worker thread) can race, entering the bus ->write or ->read functions simultaneously. This causes the FEC driver to initialise a completion while another thread is waiting on it or while the interrupt is calling complete() on it, which causes spinlock unlock-without-lock, spinlock lockups, and completion timeouts. Fixes: a59a4d192 ("phy: add the EEE support and the way to access to the MMD registers.") Fixes: 0c1d77dfb ("net: libphy: Add phy specific function to access mmd phy registers") Signed-off-by: Russell King Acked-by: Florian Fainelli Signed-off-by: David S. Miller --- Reading git-diff-tree failed