rpms/kernel/F-8 kernel.spec, 1.401, 1.402 linux-2.6-firewire-git-pending.patch, 1.9, 1.10

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Tue Mar 25 20:40:25 UTC 2008


Author: jwilson

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22819

Modified Files:
	kernel.spec linux-2.6-firewire-git-pending.patch 
Log Message:
* Tue Mar 25 2008 Jarod Wilson <jwilson at redhat.com> 2.6.24.4-56
- Plug DMA memory leak in firewire async receive handler



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.401
retrieving revision 1.402
diff -u -r1.401 -r1.402
--- kernel.spec	25 Mar 2008 20:28:32 -0000	1.401
+++ kernel.spec	25 Mar 2008 20:39:39 -0000	1.402
@@ -1931,6 +1931,9 @@
 
 
 %changelog
+* Tue Mar 25 2008 Jarod Wilson <jwilson at redhat.com> 2.6.24.4-56
+- Plug DMA memory leak in firewire async receive handler
+
 * Tue Mar 25 2008 John W. Linville <linville at redhat.com> 2.6.24.4-55
 - wavelan_cs arm fix
 - arlan: fix warning when PROC_FS=n

linux-2.6-firewire-git-pending.patch:

Index: linux-2.6-firewire-git-pending.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/linux-2.6-firewire-git-pending.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- linux-2.6-firewire-git-pending.patch	24 Mar 2008 15:14:33 -0000	1.9
+++ linux-2.6-firewire-git-pending.patch	25 Mar 2008 20:39:39 -0000	1.10
@@ -692,3 +692,62 @@
 http://arcgraph.de/sr/
 
 
+There's a minor memory leak in firewire-ohci's ar_context_tasklet(), in that
+we're not freeing up some of the memory we use for each ar_buffer, due to a
+moving pointer. The problem has been there for a while, but didn't start
+to be noticed until we were doing a coherent allocation for the ar_buffer --
+meaning we have a smaller pool of memory to work with now, so the problem
+crops up sooner. The manifestation of this comes after doing a bunch of I/O to
+a firewire disk, which eventually stalls, and this starts spewing to the
+console:
+
+PCI-DMA: Out of IOMMU space for 53248 bytes at device 0000:04:09.0
+
+The device there is one of my FireWire controllers trying to do I/O. The host
+is a fairly new rev. opteron.
+
+Just need to make sure we're freeing the correct memory range is pass through
+ar_context_tasklet to fix it. Probably something we ought to sneak into 2.6.25
+if its still doable...
+
+Signed-off-by: Jarod Wilson <jwilson at redhat.com>
+---
+
+ drivers/firewire/fw-ohci.c |    9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
+index 8ff9059..e1d50f7 100644
+--- a/drivers/firewire/fw-ohci.c
++++ b/drivers/firewire/fw-ohci.c
+@@ -579,7 +579,8 @@ static void ar_context_tasklet(unsigned long data)
+ 
+ 	if (d->res_count == 0) {
+ 		size_t size, rest, offset;
+-		dma_addr_t buffer_bus;
++		dma_addr_t start_bus;
++		void *start;
+ 
+ 		/*
+ 		 * This descriptor is finished and we may have a
+@@ -588,9 +589,9 @@ static void ar_context_tasklet(unsigned long data)
+ 		 */
+ 
+ 		offset = offsetof(struct ar_buffer, data);
+-		buffer_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
++		start = buffer = ab;
++		start_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
+ 
+-		buffer = ab;
+ 		ab = ab->next;
+ 		d = &ab->descriptor;
+ 		size = buffer + PAGE_SIZE - ctx->pointer;
+@@ -605,7 +606,7 @@ static void ar_context_tasklet(unsigned long data)
+ 			buffer = handle_ar_packet(ctx, buffer);
+ 
+ 		dma_free_coherent(ohci->card.device, PAGE_SIZE,
+-				  buffer, buffer_bus);
++				  start, start_bus);
+ 		ar_context_add_page(ctx);
+ 	} else {
+ 		buffer = ctx->pointer;




More information about the fedora-extras-commits mailing list