]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2013 17:18:33 +0000 (09:18 -0800)
commitffbbf80d13d77ef0b533d7410dd2097f37dd24c2
tree539f7ab3adbb8469ac06a2e04be99ea4b1aeed01
parente6ad3201c5b9c54cf09fd30d420378f0a9476780
rtlwifi: fix incorrect use of usb_alloc_coherent with usb_control_msg

commit 4c3de5920c486b8eefa6187ee6a181864c161100 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rtlwifi/usb.c