All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: linux-ext4@vger.kernel.org,
	Artem Blagodarenko <artem.blagodarenko@gmail.com>
Cc: adilger.kernel@dilger.ca, Andrew Perepechko <andrew.perepechko@hpe.com>
Subject: Re: [PATCH v2] ext4: truncate during setxattr leads to kernel panic
Date: Thu, 31 Mar 2022 11:02:51 -0400	[thread overview]
Message-ID: <YkXCm+2PKrlbgKJM@mit.edu> (raw)
In-Reply-To: <164823418309.637667.12757298463000030100.b4-ty@mit.edu>

On Fri, Mar 25, 2022 at 02:49:50PM -0400, Theodore Ts'o wrote:
> On Sat, 12 Mar 2022 18:18:30 -0500, Artem Blagodarenko wrote:
> > From: Andrew Perepechko <andrew.perepechko@hpe.com>
> > 
> > When changing a large xattr value to a different large xattr value,
> > the old xattr inode is freed. Truncate during the final iput causes
> > current transaction restart. Eventually, parent inode bh is marked
> > dirty and kernel panic happens when jbd2 figures out that this bh
> > belongs to the committed transaction.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/1] ext4: truncate during setxattr leads to kernel panic
>       commit: c7cded845fc192cc35a1ca37c0cd957ee35abdf8

I'm going to drop this patch from the dev branch for now, due to the
issue pointed out here[1].  The solution, as suggested in [2], is we
need to use our own subsystem workqueue.  Perhaps we can reuse
rsv_conversion_wq for that purpose (after renaming it, of course).

[1] https://lore.kernel.org/all/385ce718-f965-4005-56b6-34922c4533b8@I-love.SAKURA.ne.jp/
[2] https://lore.kernel.org/all/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp/T/#u

						- Ted

      reply	other threads:[~2022-03-31 15:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12 23:18 [PATCH v2] ext4: truncate during setxattr leads to kernel panic Artem Blagodarenko
2022-03-14 19:55 ` Andreas Dilger
2022-03-25 18:49 ` Theodore Ts'o
2022-03-31 15:02   ` Theodore Ts'o [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=YkXCm+2PKrlbgKJM@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=andrew.perepechko@hpe.com \
    --cc=artem.blagodarenko@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    /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 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.