]> git.baikalelectronics.ru Git - kernel.git/commit
rtlwifi: rtl8192cu: Change buffer allocation for synchronous reads
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 11 Jul 2012 19:37:28 +0000 (14:37 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 12 Jul 2012 19:27:18 +0000 (15:27 -0400)
commit2470191c9f2c754d9a8254803296e68ae1d1d8c8
tree05f3f6410bc376e7a28f0d9fcca686993e65591a
parentbfb2d66a6a00c6c574888f91433f4100fca0e958
rtlwifi: rtl8192cu: Change buffer allocation for synchronous reads

In commit 6604d15, the USB part of rtlwifi was switched to convert
_usb_read_sync() to using a preallocated buffer rather than one
that has been acquired using kmalloc. Although this routine is named
as though it were synchronous, there seem to be simultaneous users,
and the selection of the index to the data buffer is not multi-user
safe. This situation is addressed by adding a new spinlock. The routine
cannot sleep, thus a mutex is not allowed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/usb.c
drivers/net/wireless/rtlwifi/wifi.h