From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f170.google.com ([209.85.217.170]:35505 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750902AbcCIGmL (ORCPT ); Wed, 9 Mar 2016 01:42:11 -0500 Received: by mail-lb0-f170.google.com with SMTP id bc4so51185265lbc.2 for ; Tue, 08 Mar 2016 22:42:10 -0800 (PST) Date: Wed, 9 Mar 2016 09:42:05 +0300 From: Mike Krinkin To: Kent Overstreet Cc: Alexander Viro , linux-fsdevel@vger.kernel.org Subject: [PATCH] direct-io: fix use after free Message-ID: <20160309064205.GA2946@kmu-ThinkPad-X230> References: <20160309035258.GA311@kmo-pixel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160309035258.GA311@kmo-pixel> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, i've sent exactly the same fix a while ago in the linux-block, here it is: https://lkml.org/lkml/2016/1/30/146 On Tue, Mar 08, 2016 at 06:52:58PM -0900, Kent Overstreet wrote: > Signed-off-by: Kent Overstreet > --- > fs/direct-io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/direct-io.c b/fs/direct-io.c > index 1b2f7ffc8b..d6a9012d42 100644 > --- a/fs/direct-io.c > +++ b/fs/direct-io.c > @@ -472,8 +472,8 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio) > dio->io_error = -EIO; > > if (dio->is_async && dio->rw == READ && dio->should_dirty) { > - bio_check_pages_dirty(bio); /* transfers ownership */ > err = bio->bi_error; > + bio_check_pages_dirty(bio); /* transfers ownership */ > } else { > bio_for_each_segment_all(bvec, bio, i) { > struct page *page = bvec->bv_page; > -- > 2.7.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html