[PATCH] xfs: fix buffer use after free on IO error
Christoph Hellwig
hch at infradead.org
Tue Mar 25 13:13:55 CDT 2014
On Wed, Mar 26, 2014 at 05:08:14AM +1100, Dave Chinner wrote:
> > I think this should unconditionally avoid the schedule, and while we're
> > at it we should kill _xfs_buf_ioend and opencode it here and at the
> > other callsite.
>
> I thought we schduled here because we can issue IO from IO
> completion and so we need to requeue the IO completion rather than
> run it inline in the current IO completion that hasn't fully
> completed it's processing yet..
Actually we get a recursive callchain there from the I/O error handling.
I switched from always 0 to always 1 here in:
commit 08023d6dbe840dc4271805a9ea376fcbdee9f744
Author: Christoph Hellwig <hch at infradead.org>
Date: Mon Jul 2 06:00:04 2012 -0400
xfs: prevent recursion in xfs_buf_iorequest
but I never got around fixing the root cause by cleaning up the way we
handle buffer I/O completions on a shut down filesystem.
So I guess Eric's fix is the best we can do for now.
More information about the xfs
mailing list