All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] fs: dlm: possible ABBA deadlock
@ 2021-08-19  8:54 ` Jia-Ju Bai
  0 siblings, 0 replies; 6+ messages in thread
From: Jia-Ju Bai @ 2021-08-19  8:54 UTC (permalink / raw)
  To: ccaulfie, teigland; +Cc: cluster-devel, linux-kernel

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@tsinghua.edu.cn>


Best wishes,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-20  8:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19  8:54 [BUG] fs: dlm: possible ABBA deadlock Jia-Ju Bai
2021-08-19  8:54 ` [Cluster-devel] " Jia-Ju Bai
2021-08-19 15:55 ` David Teigland
2021-08-19 15:55   ` [Cluster-devel] " David Teigland
2021-08-20  8:16   ` Jia-Ju Bai
2021-08-20  8:16     ` [Cluster-devel] " Jia-Ju Bai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.