linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: David Teigland <teigland@redhat.com>
Cc: cluster-devel@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [BUG] fs: dlm: possible ABBA deadlock
Date: Fri, 20 Aug 2021 16:16:02 +0800	[thread overview]
Message-ID: <fbf23736-26a7-7442-2c19-ae0bea25b296@gmail.com> (raw)
In-Reply-To: <20210819155509.GB21218@redhat.com>



On 2021/8/19 23:55, David Teigland wrote:
> On Thu, Aug 19, 2021 at 04:54:57PM +0800, Jia-Ju Bai wrote:
>> 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 :)
> They won't be concurrent, "pre" runs before recovery, and "post" is after.

Okay, thanks for your reply :)


Best wishes,
Jia-Ju Bai

      reply	other threads:[~2021-08-20  8:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19  8:54 [BUG] fs: dlm: possible ABBA deadlock Jia-Ju Bai
2021-08-19 15:55 ` David Teigland
2021-08-20  8:16   ` Jia-Ju Bai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fbf23736-26a7-7442-2c19-ae0bea25b296@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=cluster-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).