mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 09:01:36 -04:00
ocfs2/dlm: call dlm_lockres_put without resource spinlock
dlm_lockres_put() should be called without &res->spinlock, otherwise a
deadlock case may happen.
spin_lock(&res->spinlock)
...
dlm_lockres_put
->dlm_lockres_release
->dlm_print_one_lock_resource
->spin_lock(&res->spinlock)
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
4a4e07c1bd
commit
9a7e6b5a0a
@@ -1710,9 +1710,12 @@ int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data,
|
||||
BUG();
|
||||
} else
|
||||
__dlm_lockres_grab_inflight_worker(dlm, res);
|
||||
} else /* put.. incase we are not the master */
|
||||
spin_unlock(&res->spinlock);
|
||||
} else {
|
||||
/* put.. incase we are not the master */
|
||||
spin_unlock(&res->spinlock);
|
||||
dlm_lockres_put(res);
|
||||
spin_unlock(&res->spinlock);
|
||||
}
|
||||
}
|
||||
spin_unlock(&dlm->spinlock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user