Description of problem:
In do_direct_IO() there is an error return path if the buffer is not mapped
and it is a write operation. In that case, the current code just returns
-ENOTBLK. The code should be calling page_cache_release(page) before the
return. Because of the bug the page reference count for the page will never
become zero and the page will never be free'd. Enough of this and your system
runs out of memory.
If you do lots of direct I/O writes with the system under memory pressure this
can happen a lot.
Created attachment 138819 [details]
Patch for leaking io_direct_IO().
I believe I may have systems affected by this issue. Has there been any
resoution? My WS4U5 workstations are getting stuck in swap and it takes forever
Would you please provide some tests to verify whether or not I am experiencing
the same issue?
Created attachment 154814 [details]
here is test, which is able to test this bug. If you will have difference in
memory ussage before and after test run, you have a bug. Test will loose 100 MB
of system memory. If you are using RHEL 4.4, patch for this bug is already
included in RHEL updates.
This seems pretty straightforward and is a bug. Upstream code matches the
I'll build & test.
*** This bug has been marked as a duplicate of 191736 ***