aboutsummaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@free-electrons.com>2016-02-04 22:09:29 +0100
committerDavid S. Miller <davem@davemloft.net>2016-02-13 06:02:19 -0500
commit120cfa502c7763f4a3758b9601f2c13d33083d64 (patch)
tree65698e251a6ed799f6414a32f1f172b5fabab0b2 /net/unix/af_unix.c
parent5888511ea053fa8d6019252ad333e8a7cb7f9475 (diff)
downloadlinux-120cfa502c7763f4a3758b9601f2c13d33083d64.tar.gz
linux-120cfa502c7763f4a3758b9601f2c13d33083d64.tar.bz2
linux-120cfa502c7763f4a3758b9601f2c13d33083d64.zip
net: mvneta: Fix race condition during stopping
When stopping the port, the CPU notifier are still there whereas the mvneta_stop_dev function calls mvneta_percpu_disable() on each CPUs. It was possible to have a new CPU coming at this point which could be racy. This patch adds a flag preventing executing the code notifier for a new CPU when the port is stopping. It also uses the spinlock introduces previously. To avoid the deadlock, the lock has been moved outside the mvneta_percpu_elect function. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions