lkml.org 
[lkml]   [2005]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kmalloc() bug in pci-dma.c
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> wrote:
>
> After burning my fingers with a similar mistake in one of the patches
> that I am working on, I did a quick grep to find out all faulty kmalloc()
> calls and found this.
>
> dma_declare_coherent_memory() is calling kmalloc with wrong arguments.
> Attached patch fixes this.
>
> Please apply.
>
> Thanks,
> Venki
>
> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
>
> --- linux-2.6.10/arch/i386/kernel/pci-dma.c.org 2005-02-11 15:18:42.596362296 -0800
> +++ linux-2.6.10/arch/i386/kernel/pci-dma.c 2005-02-11 15:19:18.446912184 -0800
> @@ -89,11 +89,11 @@ int dma_declare_coherent_memory(struct d
> if (!mem_base)
> goto out;
>
> - dev->dma_mem = kmalloc(GFP_KERNEL, sizeof(struct dma_coherent_mem));
> + dev->dma_mem = kmalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);

erp. I'll add that to the 2.6.11 queue, thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.044 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site