aboutsummaryrefslogtreecommitdiffstats
path: root/lib/flex_array.c
diff options
context:
space:
mode:
authorHuang Ying <[email protected]>2011-01-13 00:59:43 +0000
committerLinus Torvalds <[email protected]>2011-01-13 16:03:09 +0000
commitfb842b00c5eab66ec361b31550aa8a922745ce9e (patch)
treecef7e6a0bd01849fcfc911f36293304f9ba7b3c2 /lib/flex_array.c
parentdca: remove unneeded NULL check (diff)
downloadkernel-fb842b00c5eab66ec361b31550aa8a922745ce9e.tar.gz
kernel-fb842b00c5eab66ec361b31550aa8a922745ce9e.zip
printk: use RCU to prevent potential lock contention in kmsg_dump
dump_list_lock is used to protect dump_list in kmsg_dumper implementation, kmsg_dump() uses it to traverse dump_list too. But if there is contention on the lock, kmsg_dump() will fail, and the valuable kernel message may be lost. This patch solves this issue with RCU. Because kmsg_dump() only read the list, no lock is needed in kmsg_dump(). So that kmsg_dump() will never fail because of lock contention. Signed-off-by: Huang Ying <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/flex_array.c')
0 files changed, 0 insertions, 0 deletions