From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: stable@vger.kernel.org, Jan Kara <jack@suse.cz>,
Theodore Ts'o <tytso@mit.edu>
Subject: Re: [PATCH 4.4 1/2] ext4: fix crashes in dioread_nolock mode
Date: Sun, 22 Apr 2018 11:01:08 +0200 [thread overview]
Message-ID: <20180422090108.GA17189@kroah.com> (raw)
In-Reply-To: <20180422081132.23277-1-natechancellor@gmail.com>
On Sun, Apr 22, 2018 at 01:11:31AM -0700, Nathan Chancellor wrote:
> From: Jan Kara <jack@suse.cz>
>
> commit 74dae4278546b897eb81784fdfcce872ddd8b2b8 upstream.
>
> Competing overwrite DIO in dioread_nolock mode will just overwrite
> pointer to io_end in the inode. This may result in data corruption or
> extent conversion happening from IO completion interrupt because we
> don't properly set buffer_defer_completion() when unlocked DIO races
> with locked DIO to unwritten extent.
>
> Since unlocked DIO doesn't need io_end for anything, just avoid
> allocating it and corrupting pointer from inode for locked DIO.
> A cleaner fix would be to avoid these games with io_end pointer from the
> inode but that requires more intrusive changes so we leave that for
> later.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> fs/ext4/inode.c | 40 ++++++++++++++++++++--------------------
> 1 file changed, 20 insertions(+), 20 deletions(-)
>
Both patches now queued up, thanks!
greg k-h
prev parent reply other threads:[~2018-04-22 9:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-22 8:11 [PATCH 4.4 1/2] ext4: fix crashes in dioread_nolock mode Nathan Chancellor
2018-04-22 8:11 ` [PATCH 4.4 2/2] ext4: fix deadlock between inline_data and ext4_expand_extra_isize_ea() Nathan Chancellor
2018-04-22 9:01 ` Greg Kroah-Hartman [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=20180422090108.GA17189@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jack@suse.cz \
--cc=natechancellor@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tytso@mit.edu \
/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.