stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Holger Hoffstätte" <holger.hoffstaette@googlemail.com>
To: Ming Lei <ming.lei@canonical.com>, Jens Axboe <axboe@fb.com>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	stable@vger.kernel.org
Cc: Christoph Hellwig <hch@infradead.org>,
	Keith Busch <keith.busch@intel.com>
Subject: Re: [PATCH] block: loop: fix filesystem corruption in case of aio/dio
Date: Fri, 15 Apr 2016 15:50:06 +0200	[thread overview]
Message-ID: <5710F18E.7060700@googlemail.com> (raw)
In-Reply-To: <CACVXFVND3phh95c+_Yr+OYhDuWWdL681Q6_A8-2ho4j2YLoJQA@mail.gmail.com>

-------- Forwarded Message --------
Subject: Re: [PATCH] block: loop: fix filesystem corruption in case of aio/dio
Date: Fri, 15 Apr 2016 21:16:42 +0800
From: Ming Lei <ming.lei@canonical.com>
To: Holger Hoffstätte <holger.hoffstaette@googlemail.com>

On Fri, Apr 15, 2016 at 8:51 PM, Holger Hoffstätte
<holger.hoffstaette@googlemail.com> wrote:
> (off-list since I'm likely missing something..)
>
> Hello Ming Lei,
>
> quick question -
>
> On 04/15/16 12:51, Ming Lei wrote:
>> Starting from commit e36f620428(block: split bios to max possible length),
>> block core starts to split bio in the middle of bvec.
>>
>> Unfortunately loop dio/aio doesn't consider this situation, and
>> always treat 'iter.iov_offset' as zero. Then filesystem corruption
>> is observed.
>>
>> This patch figures out the offset of the base bvevc via
>> 'bio->bi_iter.bi_bvec_done' and fixes the issue by passing the offset
>> to iov iterator.
>>
>> Fixes: e36f6204288088f (block: split bios to max possible length)
>> Cc: Keith Busch <keith.busch@intel.com>
>> Cc: Al Viro <viro@zeniv.linux.org.uk>
>> Cc: stable@vger.kernel.org (4.5)
>                              ^^^^^
>
> The previous patch went into 4.4.x-stable, so should this one not go
> into 4.4.x as well? It applies cleanly and does not seem to hurt.
> Apologies in advance if this is a bad idea. :)

You are absolutely right, this patch should have been marked as stable 4.4+,
thanks for point it out!

Jens, please let me know if you need me to resend the patch for fixing
the stable tag.

Thanks,
Ming

  parent reply	other threads:[~2016-04-15 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 10:51 [PATCH] block: loop: fix filesystem corruption in case of aio/dio Ming Lei
     [not found] ` <5710E3C9.6020408@googlemail.com>
     [not found]   ` <CACVXFVND3phh95c+_Yr+OYhDuWWdL681Q6_A8-2ho4j2YLoJQA@mail.gmail.com>
2016-04-15 13:50     ` Holger Hoffstätte [this message]
2016-04-15 14:25 ` Jens Axboe

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=5710F18E.7060700@googlemail.com \
    --to=holger.hoffstaette@googlemail.com \
    --cc=axboe@fb.com \
    --cc=hch@infradead.org \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=stable@vger.kernel.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).