[Cluster-devel] [BUG] fs: dlm: possible ABBA deadlock
Jia-Ju Bai
baijiaju1990 at gmail.com
Thu Aug 19 08:54:57 UTC 2021
Hello,
My static analysis tool reports a possible ABBA deadlock in the dlm
filesystem in Linux 5.10:
dlm_recover_waiters_pre()
mutex_lock(&ls->ls_waiters_mutex); --> line 5130
recover_convert_waiter()
_receive_convert_reply()
lock_rsb()
mutex_lock(&r->res_mutex); --> line 69
dlm_recover_waiters_post()
lock_rsb()
mutex_lock(&r->res_mutex); --> line 69
mutex_lock(&ls->ls_waiters_mutex); --> line 5307
When dlm_recover_waiters_pre() and dlm_recover_waiters_post() are
concurrently executed, the deadlock can occur.
I am not quite sure whether this possible deadlock is real and how to
fix it if it is real.
Any feedback would be appreciated, thanks :)
Reported-by: TOTE Robot <oslab at tsinghua.edu.cn>
Best wishes,
Jia-Ju Bai
More information about the Cluster-devel
mailing list