Bug 232715 - fix double AIO completion due to invalidate_inode_pages2 failure
fix double AIO completion due to invalidate_inode_pages2 failure
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeffrey Moyer
Martin Jenner
http://lkml.org/lkml/2007/2/8/337
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-16 15:39 EDT by Jeffrey Moyer
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0959
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-07 14:44:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
fix double AIO completion due to invalidate_inode_pages2_range failure (5.33 KB, patch)
2007-03-16 16:56 EDT, Jeffrey Moyer
no flags Details | Diff

  None (edit)
Description Jeffrey Moyer 2007-03-16 15:39:01 EDT
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
-EIOCBQUEUED.


Version-Release number of selected component (if applicable):
kernel-2.6.18-8.el5

How reproducible:
Fairly.

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:

http://archives.free.net.ph/message/20070309.223557.f7c1c3ed.en.html
Comment 1 Jeffrey Moyer 2007-03-16 16:56:11 EDT
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 17:04:26 EDT
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
release.
Comment 5 Don Zickus 2007-06-15 20:32:12 EDT
in 2.6.18-27.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5
Comment 8 errata-xmlrpc 2007-11-07 14:44:34 EST
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.

http://rhn.redhat.com/errata/RHBA-2007-0959.html

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