From: Greg KH <gregkh@linuxfoundation.org>
To: fdmanana@kernel.org
Cc: stable@vger.kernel.org, linux-btrfs@vger.kernel.org,
Filipe Manana <fdmanana@suse.com>,
syzbot+7dbbb74af6291b5a5a8b@syzkaller.appspotmail.com,
Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>
Subject: Re: [PATCH for 5.15 stable] btrfs: fix double inode unlock for direct IO sync writes
Date: Mon, 12 Aug 2024 17:49:34 +0200 [thread overview]
Message-ID: <2024081227-sister-matcher-73a2@gregkh> (raw)
In-Reply-To: <363aee7827c9d6ff034b7e3ea2a5bf4959ff4905.1723046461.git.fdmanana@suse.com>
On Mon, Aug 12, 2024 at 04:27:33PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> commit e0391e92f9ab4fb3dbdeb139c967dcfa7ac4b115 upstream.
>
> If we do a direct IO sync write, at btrfs_sync_file(), and we need to skip
> inode logging or we get an error starting a transaction or an error when
> flushing delalloc, we end up unlocking the inode when we shouldn't under
> the 'out_release_extents' label, and then unlock it again at
> btrfs_direct_write().
>
> Fix that by checking if we have to skip inode unlocking under that label.
>
> Reported-by: syzbot+7dbbb74af6291b5a5a8b@syzkaller.appspotmail.com
> Link: https://lore.kernel.org/linux-btrfs/000000000000dfd631061eaeb4bc@google.com/
> Fixes: 939b656bc8ab ("btrfs: fix corruption after buffer fault in during direct IO append write")
> Reviewed-by: Josef Bacik <josef@toxicpanda.com>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> fs/btrfs/file.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
All now queued up, thanks.
greg k-h
prev parent reply other threads:[~2024-08-12 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1723046461.git.fdmanana@suse.com>
2024-08-07 16:06 ` [PATCH for 5.15 stable] btrfs: fix corruption after buffer fault in during direct IO append write fdmanana
2024-08-12 14:19 ` Greg KH
2024-08-12 15:27 ` [PATCH for 5.15 stable] btrfs: fix double inode unlock for direct IO sync writes fdmanana
2024-08-12 15:49 ` Greg KH [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=2024081227-sister-matcher-73a2@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dsterba@suse.com \
--cc=fdmanana@kernel.org \
--cc=fdmanana@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+7dbbb74af6291b5a5a8b@syzkaller.appspotmail.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