Hi,
This patch has fixed memory leak in dma_declare_coherent_memory().
When it goes to free1_out, dev->dma_mem has not been freed.
Yoichi
Signed-off-by: Yoichi Yuasa <[email protected]>
diff -pruN -X generic/Documentation/dontdiff generic-orig/arch/cris/arch-v32/drivers/pci/dma.c generic/arch/cris/arch-v32/drivers/pci/dma.c
--- generic-orig/arch/cris/arch-v32/drivers/pci/dma.c 2007-02-23 19:06:28.355418750 +0900
+++ generic/arch/cris/arch-v32/drivers/pci/dma.c 2007-02-23 19:08:43.311853000 +0900
@@ -111,7 +111,7 @@ int dma_declare_coherent_memory(struct d
return DMA_MEMORY_IO;
free1_out:
- kfree(dev->dma_mem->bitmap);
+ kfree(dev->dma_mem);
out:
return 0;
}
diff -pruN -X generic/Documentation/dontdiff generic-orig/arch/i386/kernel/pci-dma.c generic/arch/i386/kernel/pci-dma.c
--- generic-orig/arch/i386/kernel/pci-dma.c 2007-02-23 19:06:30.183533000 +0900
+++ generic/arch/i386/kernel/pci-dma.c 2007-02-23 19:07:28.475176000 +0900
@@ -110,7 +110,7 @@ int dma_declare_coherent_memory(struct d
return DMA_MEMORY_IO;
free1_out:
- kfree(dev->dma_mem->bitmap);
+ kfree(dev->dma_mem);
out:
if (mem_base)
iounmap(mem_base);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]