Bug 243657
| Summary: | [PATCH] Fix memory leak of dma_alloc_coherent() on x86_64 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 4 | Reporter: | Masaki MAENO <maeno.masaki> | ||||||||||||
| Component: | kernel | Assignee: | Prarit Bhargava <prarit> | ||||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Martin Jenner <mjenner> | ||||||||||||
| Severity: | urgent | Docs Contact: | |||||||||||||
| Priority: | urgent | ||||||||||||||
| Version: | 4.5 | CC: | alan.tyson, alice.pancamo, juanino, tao | ||||||||||||
| Target Milestone: | --- | Keywords: | ZStream | ||||||||||||
| Target Release: | --- | ||||||||||||||
| Hardware: | x86_64 | ||||||||||||||
| OS: | Linux | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Fixed In Version: | RHBA-2007-0791 | Doc Type: | Bug Fix | ||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||
| Clone Of: | Environment: | ||||||||||||||
| Last Closed: | 2007-11-15 16:28:28 UTC | Type: | --- | ||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||
| Documentation: | --- | CRM: | |||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||
| Embargoed: | |||||||||||||||
| Bug Depends On: | |||||||||||||||
| Bug Blocks: | 282351 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Masaki MAENO
2007-06-11 10:15:51 UTC
Created attachment 156692 [details]
dma_alloc_coherent memleak fix patch
Created attachment 156693 [details]
memleak example
Created attachment 156694 [details]
debug code (MMDEBUG) to get evidence
Created attachment 156696 [details]
evidence of memleak by debug code (MMDEBUG line)
I enumerate the memleak condition for attention.
* Condition:
- Arch: x86_64
- Memory: larger than 4GB (if cciss)
- Function: arch/x86_64/kernel/pci-gart.c:dma_alloc_coherent()
- Detail:
The memory leak is generated 4KB a degree when the bus-address of
acquired memory is 4GB or more. (if cciss)
I took Masaki's testcode and ran it on an AMD box in Westford. Sure enough, there is a memory leak. I patched the kernel with the patch above and the leak was solved. I'm redo-ing the patch and will submit to rhkernel-list. P. Created attachment 156880 [details]
RHEL4.6 Fix for this issue
This request was evaluated by Red Hat Kernel Team for inclusion in a Red Hat Enterprise Linux maintenance release, and has moved to bugzilla status POST. OK. Thank you. I hope that new maintenance kernel of RHEL4 is released early. committed in stream U6 build 55.9. A test kernel with this patch is available from http://people.redhat.com/~jbaron/rhel4/ I got your tree of kernel-2.6.9-55.9 and confirmed this patch is available. And, I confirmed that it booted and worked well. Thank you. got no right hardware do the test, (it needs a system that has a device that calls dma_alloc_coherent,SB600 system should be OK), so just do code review. 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-0791.html |