RE: aacraid code passes GFP_DMA32 to kmalloc this will not work

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

 



> -----Original Message-----
> From: Hans de Goede [mailto:hdegoede@xxxxxxxxxx]
> Sent: Thursday, March 29, 2018 8:51 AM
> To: dl-esc-Aacraid Linux Driver <aacraid@xxxxxxxxxxxxx>; James E.J.
> Bottomley <jejb@xxxxxxxxxxxxxxxxxx>; Martin K. Petersen
> <martin.petersen@xxxxxxxxxx>; SCSI development list <linux-
> scsi@xxxxxxxxxxxxxxx>; Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
> Subject: aacraid code passes GFP_DMA32 to kmalloc this will not work
> 
> 
> Hi All,
> 
> Since I made the same mistake myself I've done a quick grep for
> GFP_DMA32 in the kernel and drivers/scsi/aacraid/commctrl.c came up as a
> result of this grep, it does:
> 
>                                  p = kmalloc(sg_count[i], GFP_KERNEL|GFP_DMA32);
> 
> But kmalloc always returns memory from the normal memory-zone, if you need
> memory from a specific memory-zone like the
> DMA32 zone, you must use the dma allocation functions (which from a quick
> glance at the code seems appropriate here) or directly call alloc_page or
> __get_free_page.

Hi Hans,

I did run into this issue myself recently ... Thanks for a reminder to send in a patch to
correct this.

-Dave
> 
> Regards,
> 
> Hans




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux