summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/alloc.c
diff options
context:
space:
mode:
authorXue jiufei <xuejiufei@huawei.com>2016-01-15 00:17:18 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-15 01:00:49 +0100
commit30bee898f86506893883ffb8db20d8101a29b5f5 (patch)
treed1998a65a4373824d785773e6a9c2e7b504b01b5 /fs/ocfs2/alloc.c
parentocfs2: o2hb: increase unsteady iterations (diff)
downloadlinux-30bee898f86506893883ffb8db20d8101a29b5f5.tar.xz
linux-30bee898f86506893883ffb8db20d8101a29b5f5.zip
ocfs2/dlm: fix a race between purge and migration
We found a race between purge and migration when doing code review. Node A put lockres to purgelist before receiving the migrate message from node B which is the master. Node A call dlm_mig_lockres_handler to handle this message. dlm_mig_lockres_handler dlm_lookup_lockres >>>>>> race window, dlm_run_purge_list may run and send deref message to master, waiting the response spin_lock(&res->spinlock); res->state |= DLM_LOCK_RES_MIGRATING; spin_unlock(&res->spinlock); dlm_mig_lockres_handler returns >>>>>> dlm_thread receives the response from master for the deref message and triggers the BUG because the lockres has the state DLM_LOCK_RES_MIGRATING with the following message: dlm_purge_lockres:209 ERROR: 6633EB681FA7474A9C280A4E1A836F0F: res M0000000000000000030c0300000000 in use after deref Signed-off-by: Jiufei Xue <xuejiufei@huawei.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Reviewed-by: Yiwen Jiang <jiangyiwen@huawei.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/alloc.c')
0 files changed, 0 insertions, 0 deletions