Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>,
	linux-ext4@vger.kernel.org,
	syzbot+a43d4f48b8397d0e41a9@syzkaller.appspotmail.com
Subject: Re: [PATCH 2/3] ext4: Do not create EA inode under buffer lock
Date: Thu, 14 Mar 2024 19:12:04 +0100	[thread overview]
Message-ID: <20240314181204.shdck2lv4v7ogdzj@quack3> (raw)
In-Reply-To: <20240229155917.GA1146088@mit.edu>

On Thu 29-02-24 10:59:17, Theodore Ts'o wrote:
> On Fri, Feb 09, 2024 at 12:21:00PM +0100, Jan Kara wrote:
> > ext4_xattr_set_entry() creates new EA inodes while holding buffer lock
> > on the external xattr block. This is problematic as it nests all the
> > allocation locking (which acquires locks on other buffers) under the
> > buffer lock. This can even deadlock when the filesystem is corrupted and
> > e.g. quota file is setup to contain xattr block as data block. Move the
> > allocation of EA inode out of ext4_xattr_set_entry() into the callers.
> > 
> > Reported-by: syzbot+a43d4f48b8397d0e41a9@syzkaller.appspotmail.com
> > Signed-off-by: Jan Kara <jack@suse.cz>
> 
> In my testing I've found that this is causing a regression for
> ext4/026 in the encrypt configuration.  This can be replicated using
> "kvm-xfstests -c encrypt ext4/026.   Logs follow below.
> 
> I'll try to take a closer look, but I may end up deciding to drop this
> patch or possible the whole patch series until we can figure out
> what's going on.

OK, I've found the problem. I'll rebase patches on top of rc1 when it
happens and send fixed version. Thanks for catching this!

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2024-03-14 18:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 11:20 [PATCH 0/3] ext4: Create EA inodes outside of buffer lock Jan Kara
2024-02-09 11:20 ` [PATCH 1/3] ext4: Fold quota accounting into ext4_xattr_inode_lookup_create() Jan Kara
2024-02-09 11:21 ` [PATCH 2/3] ext4: Do not create EA inode under buffer lock Jan Kara
2024-02-29 15:59   ` Theodore Ts'o
2024-03-14 18:12     ` Jan Kara [this message]
2024-02-09 11:21 ` [PATCH 3/3] ext4: Drop duplicate ea_inode handling in ext4_xattr_block_set() Jan Kara
2024-02-22 15:54 ` [PATCH 0/3] ext4: Create EA inodes outside of buffer lock Theodore Ts'o
2024-03-21 16:26 ` [PATCH 0/2 v2] " Jan Kara
2024-03-21 16:26 ` [PATCH 1/2] Revert "ext4: drop duplicate ea_inode handling in ext4_xattr_block_set()" Jan Kara
2024-05-03  4:02   ` Theodore Ts'o
2024-03-21 16:26 ` [PATCH 2/2] ext4: Do not create EA inode under buffer lock Jan Kara
2024-03-22 18:06   ` Andreas Dilger
2024-03-25 19:03     ` Jan Kara
2024-05-03  4:03   ` Theodore Ts'o

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=20240314181204.shdck2lv4v7ogdzj@quack3 \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=syzbot+a43d4f48b8397d0e41a9@syzkaller.appspotmail.com \
    --cc=tytso@mit.edu \
    /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