All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH] fs: gracefully handle ->get_block not mapping bh in __mpage_writepage
Date: Fri, 27 Jan 2023 14:32:13 +0100	[thread overview]
Message-ID: <20230127133213.su4cl6zuiuuv2p35@quack3> (raw)
In-Reply-To: <20230126115455.296681b67273410e729309b0@linux-foundation.org>

On Thu 26-01-23 11:54:55, Andrew Morton wrote:
> On Thu, 26 Jan 2023 09:51:55 +0100 Jan Kara <jack@suse.cz> wrote:
> 
> > When filesystem's ->get_block function does not map the buffer head when
> > called from __mpage_writepage(), the function will happily go and pass
> 
> "the function" being __mpage_writepage(), not ->get_block()...

Ah, right :)

> > bogus bdev and block number to bio allocation routines which leads to
> > crashes sooner or later.
> 
> Crashes are unwelcome.  How is this bug triggered?  Should we backport
> the fix?  I assume this is a longstanding thing and that any Fixes:
> target would be ancient?  If ancient, why did it take so long to
> discover?

fsstress was able to trigger the problem for UDF. The problem is there likely
since the time __mpage_writepage() was created (definitely pre-git). But
usually filesystems using mpage_writepages() just allocate blocks in their
->get_block() method so the problem was not visible until I've changed UDF
to not allocate blocks from page writeback (to fix some other bug).

For that reason, I'm actually carrying this change in my tree so that I
don't get swamped with 0-day and syzbot reports on that offending UDF fix.

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

      reply	other threads:[~2023-01-27 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26  8:51 [PATCH] fs: gracefully handle ->get_block not mapping bh in __mpage_writepage Jan Kara
2023-01-26 15:15 ` Christoph Hellwig
2023-01-26 19:54 ` Andrew Morton
2023-01-27 13:32   ` Jan Kara [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=20230127133213.su4cl6zuiuuv2p35@quack3 \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=willy@infradead.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.