[PATCH 0/3] jump_labels: concurrency fixes

From: Paolo Bonzini
Date: Tue Aug 01 2017 - 11:24:49 EST


Any use of key->enabled (that is static_key_enabled and static_key_count)
outside jump_label_lock should handle its own serialization. Notably
among those that don't do so is static_key_enable/disable itself. Once
those are fixed (patch 1), they can be used to fix the actual offenders in
net/ (patch 2).

Patch 3 is not fixing anything, but the function cannot be used correctly
from any place other than cpuset.c itself so it is moved there.

Based on discussion with Peter Zijlstra.

Paolo

Paolo Bonzini (3):
jump_labels: fix concurrent static_key_enable/disable()
jump_labels: do not use unserialized static_key_enabled
cpuset: make nr_cpusets private

Documentation/static-keys.txt | 5 ++++
include/linux/cpuset.h | 6 -----
include/linux/jump_label.h | 22 ++++++++--------
kernel/cgroup/cpuset.c | 7 +++++
kernel/jump_label.c | 59 +++++++++++++++++++++++++++----------------
net/ipv4/udp.c | 3 +--
net/ipv6/udp.c | 3 +--
7 files changed, 63 insertions(+), 42 deletions(-)

--
1.8.3.1