aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorHeiko Carstens <[email protected]>2010-11-26 13:42:47 +0100
committerIngo Molnar <[email protected]>2010-11-26 15:03:11 +0100
commit49f4138346b3cec2706adff02658fe27ceb1e46f (patch)
tree20259bf8196685766e8b4d3ae761102a0f635913 /net/lapb/lapb_iface.c
parentd5ad140bc1505a98c0f040937125bfcbb508078f (diff)
printk: Fix wake_up_klogd() vs cpu hotplug
wake_up_klogd() may get called from preemptible context but uses __raw_get_cpu_var() to write to a per cpu variable. If it gets preempted between getting the address and writing to it, the cpu in question could be offline if the process gets scheduled back and hence writes to the per cpu data of an offline cpu. This buggy behaviour was introduced with fa33507a "printk: robustify printk, fix #2" which was supposed to fix a "using smp_processor_id() in preemptible" warning. Let's use this_cpu_write() instead which disables preemption and makes sure that the outlined scenario cannot happen. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions