All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Christoph Hellwig <hch@lst.de>
Cc: clm@fb.com, dsterba@suse.com, linux-btrfs@vger.kernel.org,
	syzbot <syzbot+5b82f0e951f8c2bcdb8f@syzkaller.appspotmail.com>
Subject: Re: [PATCH] btrfs: fix ordered extent split error handling in btrfs_dio_submit_io
Date: Fri, 14 Jul 2023 10:04:23 -0400	[thread overview]
Message-ID: <20230714140423.GB466183@perftesting> (raw)
In-Reply-To: <20230714084241.548739-1-hch@lst.de>

On Fri, Jul 14, 2023 at 10:42:41AM +0200, Christoph Hellwig wrote:
> When the call to btrfs_extract_ordered_extent in btrfs_dio_submit_io
> fails to allocate memory for a new ordered_extent, it calls into the
> btrfs_dio_end_io for error handling.  btrfs_dio_end_io then assumes that
> bbio->ordered is set because it is supposed to be at this point, except
> for this error handling corner case.  Try to not overload the
> btrfs_dio_end_io with error handling of a bio in a non-canonical state,
> and instead call btrfs_finish_ordered_extent and iomap_dio_bio_end_io
> directly for this error case.
> 
> Fixes: b41b6f6937dc ("btrfs: use btrfs_finish_ordered_extent to complete direct writes")
> Reported-by: syzbot <syzbot+5b82f0e951f8c2bcdb8f@syzkaller.appspotmail.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Tested-by: syzbot <syzbot+5b82f0e951f8c2bcdb8f@syzkaller.appspotmail.com>

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef

  reply	other threads:[~2023-07-14 14:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  8:42 [PATCH] btrfs: fix ordered extent split error handling in btrfs_dio_submit_io Christoph Hellwig
2023-07-14 14:04 ` Josef Bacik [this message]
2023-07-17 23:46 ` David Sterba

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=20230714140423.GB466183@perftesting \
    --to=josef@toxicpanda.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=syzbot+5b82f0e951f8c2bcdb8f@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 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.