]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2012 15:22:52 +0000 (08:22 -0700)
commit6f87baecc2b149ee54dfd79cc126d5b4f7c4dc0d
tree292517dd4bebcb8636994956351f6eb7a53d194e
parentc366e8b007d8713039a464b87f7dbd402d3861ab
rtlwifi: rtl8192cu: Change buffer allocation for synchronous reads

commit 3ce4d85b76010525adedcc2555fa164bf706a2f3 upstream.

In commit a7959c1, 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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rtlwifi/usb.c
drivers/net/wireless/rtlwifi/wifi.h