ocfs2: fix deadlock risk when kmalloc failed in dlm_query_region_handler
authorZhonghua Guo <guozhonghua@h3c.com>
Thu, 3 Apr 2014 21:47:02 +0000 (14:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:20:55 +0000 (16:20 -0700)
commita35ad97cd48cfab45f4ee5eb0e6f5787a05cab25
treee94ba401f7bcaba9924972ac71c09f465fb50302
parentc8d888d9f1469806c339218fc342817eb3b628a8
ocfs2: fix deadlock risk when kmalloc failed in dlm_query_region_handler

In dlm_query_region_handler(), once kmalloc failed, it will unlock
dlm_domain_lock without lock first, then deadlock happens.

Signed-off-by: Zhonghua Guo <guozhonghua@h3c.com>
Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Reviewed-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Tested-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>
fs/ocfs2/dlm/dlmdomain.c