android_kernel_google_msm/fs/ocfs2
Joseph Qi f5499bfc0b 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>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2016-04-27 18:55:24 +08:00
..
cluster switch debugfs to umode_t 2012-01-03 22:54:56 -05:00
dlm ocfs2/dlm: fix deadlock when dispatch assert master 2016-04-27 18:55:24 +08:00
dlmfs switch open-coded instances of d_make_root() to new helper 2012-03-20 21:29:35 -04:00
acl.c
acl.h
alloc.c ocfs2: ->l_next_free_req breakage on big-endian 2012-04-13 12:31:37 -04:00
alloc.h
aops.c ocfs2: fix journal commit deadlock 2015-04-14 17:33:47 +08:00
aops.h
blockcheck.c
blockcheck.h
buffer_head_io.c ocfs2: do not put bh when buffer_uptodate failed 2014-05-06 07:51:46 -07:00
buffer_head_io.h
dcache.c move d_rcu from overlapping d_child to overlapping d_alias 2015-04-14 17:33:58 +08:00
dcache.h
dir.c
dir.h
dlmglue.c ocfs2: fix BUG in ocfs2_downconvert_thread_do_work() 2016-03-21 09:17:51 +08:00
dlmglue.h
export.c
export.h
extent_map.c ocfs2: fix the end cluster offset of FIEMAP 2013-09-26 17:15:50 -07:00
extent_map.h
file.c splice: Apply generic position and size checks to each write 2015-06-19 11:40:32 +08:00
file.h
heartbeat.c
heartbeat.h
inode.c
inode.h
ioctl.c get rid of pointless includes of ext2_fs.h 2012-03-31 16:03:15 -04:00
ioctl.h
journal.c
journal.h
Kconfig
localalloc.c
localalloc.h
locks.c
locks.h
Makefile
mmap.c
mmap.h
move_extents.c vfs: mnt_drop_write_file() 2012-01-03 22:52:40 -05:00
move_extents.h
namei.c ocfs2: deal with wraparounds of i_nlink in ocfs2_rename() 2012-02-13 20:45:39 -05:00
namei.h
ocfs1_fs_compat.h
ocfs2.h
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h
quota.h
quota_global.c ocfs2: fix quota file corruption 2014-03-23 21:37:03 -07:00
quota_local.c ocfs2: fix quota file corruption 2014-03-23 21:37:03 -07:00
refcounttree.c ocfs2: ->rl_count endianness breakage 2012-04-13 12:31:41 -04:00
refcounttree.h
reservations.c
reservations.h
resize.c
resize.h
slot_map.c
slot_map.h
stack_o2cb.c
stack_user.c dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
stackglue.c
stackglue.h
suballoc.c ocfs2: ac->ac_allow_chain_relink=0 won't disable group relink 2013-03-04 06:06:40 +08:00
suballoc.h ocfs2: ac->ac_allow_chain_relink=0 won't disable group relink 2013-03-04 06:06:40 +08:00
super.c fs: create and use seq_show_option for escaping 2016-04-27 18:55:18 +08:00
super.h
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
ver.c
ver.h
xattr.c ocfs2: xattr: fix inlined xattr reflink 2013-07-21 18:19:01 -07:00
xattr.h ocfs2: propagate umode_t 2012-01-03 22:55:02 -05:00