rtlwifi: fix incorrect use of usb_alloc_coherent with usb_control_msg
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Thu, 20 Dec 2012 14:24:43 +0000 (16:24 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Jan 2013 19:38:24 +0000 (14:38 -0500)
commit4c3de5920c486b8eefa6187ee6a181864c161100
tree0368a2ded8fff18f8e6fc4d1442a816eaad393af
parent12e9432707dad5a09d8c51857b275c62bb6f91c8
rtlwifi: fix incorrect use of usb_alloc_coherent with usb_control_msg

Incorrect use of usb_alloc_coherent memory as input buffer to usb_control_msg
can cause problems in arch DMA code, for example kernel BUG at
'arch/arm/include/asm/dma-mapping.h:321' on ARM (linux-3.4).

Change _usb_writeN_sync use kmalloc'd buffer instead.

Cc: stable@vger.kernel.org
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/usb.c