The patch titled
dma_declare_coherent_memory wrong allocation
has been removed from the -mm tree. Its filename was
dma_declare_coherent_memory-wrong-allocation.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
Subject: dma_declare_coherent_memory wrong allocation
From: Guennadi Liakhovetski <[EMAIL PROTECTED]>
dma_declare_coherent_memory() allocates a bitmap 1 bit per page, it
calculates the bitmap size based on size of long, but allocates bytes...
Thanks to James Bottomley for clarifications and corrections.
Signed-off-by: G. Liakhovetski <[EMAIL PROTECTED]>
Acked-by: James Bottomley <[EMAIL PROTECTED]>
Cc: Mikael Starvik <[EMAIL PROTECTED]>
Cc: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
arch/cris/arch-v32/drivers/pci/dma.c | 2 +-
arch/i386/kernel/pci-dma.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff -puN
arch/cris/arch-v32/drivers/pci/dma.c~dma_declare_coherent_memory-wrong-allocation
arch/cris/arch-v32/drivers/pci/dma.c
---
a/arch/cris/arch-v32/drivers/pci/dma.c~dma_declare_coherent_memory-wrong-allocation
+++ a/arch/cris/arch-v32/drivers/pci/dma.c
@@ -76,7 +76,7 @@ int dma_declare_coherent_memory(struct d
{
void __iomem *mem_base;
int pages = size >> PAGE_SHIFT;
- int bitmap_size = (pages + 31)/32;
+ int bitmap_size = BITS_TO_LONGS(pages) * sizeof(long);
if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0)
goto out;
diff -puN
arch/i386/kernel/pci-dma.c~dma_declare_coherent_memory-wrong-allocation
arch/i386/kernel/pci-dma.c
--- a/arch/i386/kernel/pci-dma.c~dma_declare_coherent_memory-wrong-allocation
+++ a/arch/i386/kernel/pci-dma.c
@@ -77,7 +77,7 @@ int dma_declare_coherent_memory(struct d
{
void __iomem *mem_base = NULL;
int pages = size >> PAGE_SHIFT;
- int bitmap_size = (pages + 31)/32;
+ int bitmap_size = BITS_TO_LONGS(pages) * sizeof(long);
if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0)
goto out;
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
origin.patch
git-scsi-misc.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html