diff options
author | Joseph Qi <joseph.qi@huawei.com> | 2015-09-22 14:59:20 -0700 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2015-10-13 03:46:11 +0100 |
commit | 307c6c27d5de3b44965cdba2a69e1d5f922a01c1 (patch) | |
tree | bdbd2602f6bb845b22ea0393cd0b02817c823b1c /fs/attr.c | |
parent | 81fbc9a5dd000126ef727dcdaea3ef5714d1e898 (diff) | |
download | kernel_samsung_smdk4412-307c6c27d5de3b44965cdba2a69e1d5f922a01c1.zip kernel_samsung_smdk4412-307c6c27d5de3b44965cdba2a69e1d5f922a01c1.tar.gz kernel_samsung_smdk4412-307c6c27d5de3b44965cdba2a69e1d5f922a01c1.tar.bz2 |
ocfs2/dlm: fix deadlock when dispatch assert master
commit 012572d4fc2e4ddd5c8ec8614d51414ec6cae02a upstream.
The order of the following three spinlocks should be:
dlm_domain_lock < dlm_ctxt->spinlock < dlm_lock_resource->spinlock
But dlm_dispatch_assert_master() is called while holding
dlm_ctxt->spinlock and dlm_lock_resource->spinlock, and then it calls
dlm_grab() which will take dlm_domain_lock.
Once another thread (for example, dlm_query_join_handler) has already
taken dlm_domain_lock, and tries to take dlm_ctxt->spinlock deadlock
happens.
Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: "Junxiao Bi" <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/attr.c')
0 files changed, 0 insertions, 0 deletions