summaryrefslogtreecommitdiffstats
path: root/net/packet/Kconfig
diff options
context:
space:
mode:
authorJoyce <xuejiufei@huawei.com>2013-09-11 14:20:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 15:56:51 -0700
commit6f8648e894498f769832b79399b1cfabd2973ea9 (patch)
tree4ea339363940a3412d8be1dfe668f66eda03214f /net/packet/Kconfig
parent03dbe88aa9cd0d7b0a876b38bd75ce73b4522454 (diff)
downloadlinux-stable-6f8648e894498f769832b79399b1cfabd2973ea9.tar.gz
linux-stable-6f8648e894498f769832b79399b1cfabd2973ea9.tar.bz2
linux-stable-6f8648e894498f769832b79399b1cfabd2973ea9.zip
ocfs2: fix a tiny race case when firing callbacks
In o2hb_shutdown_slot() and o2hb_check_slot(), since event is defined as local, it is only valid during the call stack. So the following tiny race case may happen in a multi-volumes mounted environment: o2hb-vol1 o2hb-vol2 1) o2hb_shutdown_slot allocate local event1 2) queue_node_event add event1 to global o2hb_node_events 3) o2hb_shutdown_slot allocate local event2 4) queue_node_event add event2 to global o2hb_node_events 5) o2hb_run_event_list delete event1 from o2hb_node_events 6) o2hb_run_event_list event1 empty, return 7) o2hb_shutdown_slot event1 lifecycle ends 8) o2hb_fire_callbacks event1 is already *invalid* This patch lets it wait on o2hb_callback_sem when another thread is firing callbacks. And for performance consideration, we only call o2hb_run_event_list when there is an event queued. Signed-off-by: Joyce <xuejiufei@huawei.com> Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/packet/Kconfig')
0 files changed, 0 insertions, 0 deletions