linux/net/core
Neil Horman 4fdcfa1284 drop_monitor: prevent init path from scheduling on the wrong cpu
I just noticed after some recent updates, that the init path for the drop
monitor protocol has a minor error.  drop monitor maintains a per cpu structure,
that gets initalized from a single cpu.  Normally this is fine, as the protocol
isn't in use yet, but I recently made a change that causes a failed skb
allocation to reschedule itself .  Given the current code, the implication is
that this workqueue reschedule will take place on the wrong cpu.  If drop
monitor is used early during the boot process, its possible that two cpus will
access a single per-cpu structure in parallel, possibly leading to data
corruption.

This patch fixes the situation, by storing the cpu number that a given instance
of this per-cpu data should be accessed from.  In the case of a need for a
reschedule, the cpu stored in the struct is assigned the rescheule, rather than
the currently executing cpu

Tested successfully by myself.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-02 21:02:48 -04:00
..
datagram.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
dev_addr_lists.c net: fix /proc/net/dev regression 2012-04-03 17:23:23 -04:00
dev.c net: In unregister_netdevice_notifier unregister the netdevices. 2012-04-13 11:01:43 -04:00
drop_monitor.c drop_monitor: prevent init path from scheduling on the wrong cpu 2012-05-02 21:02:48 -04:00
dst.c
ethtool.c
fib_rules.c
filter.c bpf jit: Make the filter.c::__load_pointer helper non-static for the jits 2012-04-03 18:01:03 -04:00
flow_dissector.c
flow.c
gen_estimator.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
gen_stats.c
iovec.c
kmap_skb.h
link_watch.c
Makefile
neighbour.c
net_namespace.c netns: do not leak net_generic data on failed init 2012-04-18 00:05:33 -04:00
net-sysfs.c
net-sysfs.h
net-traces.c
netevent.c
netpoll.c
netprio_cgroup.c
pktgen.c
request_sock.c
rtnetlink.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
scm.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
secure_seq.c
skbuff.c net: allow pskb_expand_head() to get maximum tailroom 2012-04-11 10:10:43 -04:00
sock_diag.c
sock.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
stream.c
sysctl_net_core.c
timestamping.c
user_dma.c
utils.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00