From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: Joseph Qi <joseph.qi@linux.alibaba.com>,
mark@fasheh.com, jlbec@evilplan.org
Cc: ocfs2-devel@oss.oracle.com, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] fs: ocfs2: possible ABBA deadlock in ocfs2_dio_end_io_write() and ocfs2_move_extents()
Date: Tue, 14 Dec 2021 15:19:42 +0800 [thread overview]
Message-ID: <093db193-baf8-b2c1-5667-7ded591a8437@gmail.com> (raw)
In-Reply-To: <bd6dfb63-6d3d-c8f6-f401-8bdd5334afed@linux.alibaba.com>
On 2021/12/14 15:08, Joseph Qi wrote:
> Hi,
>
> Thanks for the report. But I don't think this is a possible deadlock in
> practice. Please see my comments below.
>
> On 12/10/21 4:38 PM, Jia-Ju Bai wrote:
>> Hello,
>>
>> My static analysis tool reports a possible ABBA deadlock in the ocfs2 module in Linux 5.10:
>>
>> ocfs2_dio_end_io_write()
>> down_write(&oi->ip_alloc_sem); --> Line 2322 (Lock A)
>> ocfs2_del_inode_from_orphan()
>> inode_lock(orphan_dir_inode); --> Line 2701 (Lock B)
> Just as the variable name indicates, it is orphan dir inode, which is a
> system file (something hidden inside the filesystem) and not visible for
> end user.
>
>> ocfs2_move_extents()
>> inode_lock(inode); --> Line 916 (Lock B)
> This is called from a ioctl from user, it a normal file inode.
Okay, thanks for the explanation :)
Best wishes,
Jia-Ju Bai
next prev parent reply other threads:[~2021-12-14 7:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 8:38 Jia-Ju Bai
2021-12-14 7:08 ` Joseph Qi
2021-12-14 7:19 ` Jia-Ju Bai [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-12-10 8:37 Jia-Ju Bai
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=093db193-baf8-b2c1-5667-7ded591a8437@gmail.com \
--to=baijiaju1990@gmail.com \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@oss.oracle.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
all inboxes | Powered by JetHome®