From: Christoph Hellwig <hch@lst.de>
To: Huang Ying <ying.huang@intel.com>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@fb.com>,
LKML <linux-kernel@vger.kernel.org>, LKP ML <lkp@01.org>
Subject: Re: [lkp] [block] bcf2843b3f8: BUG: KASan: use after free in dio_bio_complete+0x15a/0x190 at addr ffff88001114e6f8
Date: Thu, 30 Jul 2015 08:22:05 +0200 [thread overview]
Message-ID: <20150730062205.GB29312@lst.de> (raw)
In-Reply-To: <1438224799.6405.12.camel@intel.com>
On Thu, Jul 30, 2015 at 10:53:19AM +0800, Huang Ying wrote:
> FYI, we noticed the below changes on
This should fix it:
diff --git a/fs/direct-io.c b/fs/direct-io.c
index e1639c8..31b2d35 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -458,9 +458,10 @@ static struct bio *dio_await_one(struct dio *dio)
static int dio_bio_complete(struct dio *dio, struct bio *bio)
{
struct bio_vec *bvec;
+ int error = bio->bi_error;
unsigned i;
- if (bio->bi_error)
+ if (error)
dio->io_error = -EIO;
if (dio->is_async && dio->rw == READ) {
@@ -475,7 +476,7 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio)
}
bio_put(bio);
}
- return bio->bi_error;
+ return error;
}
/*
prev parent reply other threads:[~2015-07-30 6:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 2:53 Huang Ying
2015-07-30 6:22 ` Christoph Hellwig [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=20150730062205.GB29312@lst.de \
--to=hch@lst.de \
--cc=axboe@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=ying.huang@intel.com \
/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
all inboxes | Powered by JetHome®