Re: [PATCH] mfd: rtsx_usb: prevent DMA from stack

2015-03-06 Thread Lee Jones
On Fri, 06 Mar 2015, Roger Tseng wrote: > Functions rtsx_usb_ep0_read_register() and rtsx_usb_get_card_status() > both use arbitrary buffer addresses from arguments directly for DMA and > the buffers could be located in stack. This was caught by DMA-API debug > check. > > Fixes this by using doub

[PATCH] mfd: rtsx_usb: prevent DMA from stack

2015-03-05 Thread Roger Tseng
Functions rtsx_usb_ep0_read_register() and rtsx_usb_get_card_status() both use arbitrary buffer addresses from arguments directly for DMA and the buffers could be located in stack. This was caught by DMA-API debug check. Fixes this by using double-buffers via kzalloc in both functions to guarantee