linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jan Kara <jack@suse.cz>
Cc: <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: Thu, 26 Jan 2023 11:54:55 -0800	[thread overview]
Message-ID: <20230126115455.296681b67273410e729309b0@linux-foundation.org> (raw)
In-Reply-To: <20230126085155.26395-1-jack@suse.cz>

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()...

> 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?

> E.g. UDF can do this because it doesn't want to
> allocate blocks from ->writepages callbacks. It allocates blocks on
> write or page fault but writeback can still spot dirty buffers without
> underlying blocks allocated e.g. if blocksize < pagesize, the tail page
> is dirtied (which means all its buffers are dirtied), and truncate
> extends the file so that some buffer starts to be within i_size.
>
> ...

  parent reply	other threads:[~2023-01-26 19:55 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 [this message]
2023-01-27 13:32   ` Jan Kara

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=20230126115455.296681b67273410e729309b0@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).