Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 232715 - fix double AIO completion due to invalidate_inode_pages2 failure
Summary: fix double AIO completion due to invalidate_inode_pages2 failure
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Jeff Moyer
QA Contact: Martin Jenner
Depends On:
TreeView+ depends on / blocked
Reported: 2007-03-16 19:39 UTC by Jeff Moyer
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHBA-2007-0959
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-11-07 19:44:34 UTC
Target Upstream Version:

Attachments (Terms of Use)
fix double AIO completion due to invalidate_inode_pages2_range failure (deleted)
2007-03-16 20:56 UTC, Jeff Moyer
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0959 normal SHIPPED_LIVE Updated kernel packages for Red Hat Enterprise Linux 5 Update 1 2007-11-08 00:47:37 UTC

Description Jeff Moyer 2007-03-16 19:39:01 UTC
Description of problem:
Before this patch we had the problem where this invalidation failure would
clobber -EIOCBQUEUED as it made its way from fs/direct-io.c to fs/aio.c.  Both
fs/aio.c and bio completion call aio_complete() and we reference freed memory,
usually oopsing.

This patch addresses this problem by invalidating before the write so that we
can cleanly return -EIO before ->direct_IO() has had a chance to return

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Run the aio_dio_bugs tests in the autotest test suite.
Actual results:
Kernel panic

Expected results:
No kernel panic

Additional info:
Fix posted to lkml:

Comment 1 Jeff Moyer 2007-03-16 20:56:11 UTC
Created attachment 150279 [details]
fix double AIO completion due to invalidate_inode_pages2_range failure

Comment 2 RHEL Product and Program Management 2007-03-16 21:04:26 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 5 Don Zickus 2007-06-16 00:32:12 UTC
in 2.6.18-27.el5
You can download this test kernel from

Comment 8 errata-xmlrpc 2007-11-07 19:44:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.