https://github.com/torvalds/linux
Revision aac27c7a0d76683f7f4bdf41cec174db2819f635 authored by Russell King on 25 August 2015, 08:49:53 UTC, committed by David S. Miller on 25 August 2015, 23:33:16 UTC
Rather than re-initialising the entire completion on every mdio access,
use reinit_completion() which only resets the completion count.  This
avoids possible reinitialisation of the contained spinlock and waitqueue
while they may be in use (eg, mid-completion.)

Such an event could occur if there's a long delay in interrupt handling
causing the mdio accessor to time out, then a second access comes in
while the interrupt handler on a different CPU has called complete().
Another scenario where this has been observed is while locking has
been missing at the phy layer, allowing concurrent attempts to access
the MDIO bus.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 05a7f58
History
Tip revision: aac27c7a0d76683f7f4bdf41cec174db2819f635 authored by Russell King on 25 August 2015, 08:49:53 UTC
net: fec: use reinit_completion() in mdio accessor functions
Tip revision: aac27c7
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.2 KB
.mailmap -rw-r--r-- 5.3 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 94.7 KB
Kbuild -rw-r--r-- 2.6 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 314.0 KB
Makefile -rw-r--r-- 53.3 KB
README -rw-r--r-- 18.2 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top