Re: [PATCH] staging: btmtk_usb: check for a valid io_buf pointer

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

 



On Sat, May 25, 2013 at 11:04:16PM -0400, Devendra Naga wrote:
> assigned to retval of kmalloc but not checked whether the allocation failed or not,
> fail the registering if allocation fail
> 
> Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>
> ---
> 
> Hello, 
> 
> Seems that kmalloc is called with GFP_ATOMIC flag
> which is in registering stage, as since there wont be any
> interrupt context in this path, may i change it to GFP_KERNEL in a
> subsequent patch?

Yes.  Feel free to change it.

It's not in an IRQ and there are no spinlocks held.  We just did a
GFP_KERNEL allocation a few lines earlier in the call to
hci_alloc_dev().

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux