diff options
author | Milton Miller <miltonm@bga.com> | 2011-03-15 20:27:16 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 00:58:10 +0100 |
commit | e6cd1e07a185d5f9b0aa75e020df02d3c1c44940 (patch) | |
tree | 74f58672a37de933f8fa3456c0ec19a73b483b65 /net/packet | |
parent | mm: PageBuddy and mapcount robustness (diff) | |
download | linux-e6cd1e07a185d5f9b0aa75e020df02d3c1c44940.tar.xz linux-e6cd1e07a185d5f9b0aa75e020df02d3c1c44940.zip |
call_function_many: fix list delete vs add race
Peter pointed out there was nothing preventing the list_del_rcu in
smp_call_function_interrupt from running before the list_add_rcu in
smp_call_function_many.
Fix this by not setting refs until we have gotten the lock for the list.
Take advantage of the wmb in list_add_rcu to save an explicit additional
one.
I tried to force this race with a udelay before the lock & list_add and
by mixing all 64 online cpus with just 3 random cpus in the mask, but
was unsuccessful. Still, inspection shows a valid race, and the fix is
a extension of the existing protection window in the current code.
Cc: stable@kernel.org (v2.6.32 and later)
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/packet')
0 files changed, 0 insertions, 0 deletions