From: Al Viro <viro@ZenIV.linux.org.uk>
To: Xiaotian Feng <dfeng@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Jens Axboe <jens.axboe@oracle.com>,
Jeff Moyer <jmoyer@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Nikanth Karthikesan <knikanth@suse.de>,
Zach Brown <zach.brown@oracle.com>
Subject: Re: [PATCH] direct_io: fix use after free in __blockdev_direct_IO
Date: Thu, 17 Dec 2009 09:29:42 +0000 [thread overview]
Message-ID: <20091217092942.GX14381@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1261039772-18403-1-git-send-email-dfeng@redhat.com>
On Thu, Dec 17, 2009 at 04:49:32PM +0800, Xiaotian Feng wrote:
> @@ -1197,7 +1200,11 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
> (end > i_size_read(inode)));
>
> retval = direct_io_worker(rw, iocb, inode, iov, offset,
> - nr_segs, blkbits, get_block, end_io, dio);
> + nr_segs, blkbits, get_block, end_io,
> + dio, &dio_freed);
> +
> + if (dio_freed)
> + goto out;
Um... I'm not sure that this would be the right fix. How about simple
s/dio->flags/flags/ in the line below?
next prev parent reply other threads:[~2009-12-17 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 8:49 [PATCH] direct_io: fix use after free in __blockdev_direct_IO Xiaotian Feng
2009-12-17 9:29 ` Al Viro [this message]
2009-12-17 9:34 ` Xiaotian Feng
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=20091217092942.GX14381@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=dfeng@redhat.com \
--cc=jens.axboe@oracle.com \
--cc=jmoyer@redhat.com \
--cc=knikanth@suse.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zach.brown@oracle.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