Re: [PATCH v2] sparc32: dma_alloc_coherent must honour GFP_ZERO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Daniel Hellstrom <daniel@xxxxxxxxxxx>
Date: Fri,  5 Sep 2014 11:27:48 +0200

> dma_zalloc_coherent() calls dma_alloc_coherent(__GFP_ZERO)
> but the sparc32 implementations sbus_alloc_coherent() and
> pci32_alloc_coherent() doesn't take the gfp flags into
> account.
> 
> Tested on the SPARC32/LEON GRETH Ethernet driver which fails
> due to dma_alloc_coherent(__GFP_ZERO) returns non zeroed
> pages.
> 
> Signed-off-by: Daniel Hellstrom <daniel@xxxxxxxxxxx>

The real bug is that we ignore the gfp flags completely, there
is no reason to override whatever 'gfp' is into a hard coded
"GFP_KERNEL" or "GFP_KERNEL | __GFP_COMP".

Please just make these routines use 'gfp' as-is.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux