diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-03-19 15:44:31 -0500 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-05-31 00:44:05 +0100 |
commit | e290f74d471e775b61f5639b4c03c5cc71114578 (patch) | |
tree | 0c2b687bce4cb92750c25ad50065b29358f5bd7c /virt/kvm | |
parent | 9c3525a464d223768a38664d90e2092e7a4344d5 (diff) |
rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine
commit a7959c1394d4126a70a53b914ce4105f5173d0aa upstream.
The current version of rtlwifi for USB operations uses kmalloc to
acquire a 32-bit buffer for each read of the device. When
_usb_read_sync() is called with the rcu_lock held, the result is
a "sleeping function called from invalid context" BUG. This is
reported for two cases in https://bugzilla.kernel.org/show_bug.cgi?id=42775.
The first case has the lock originating from within rtlwifi and could
be fixed by rearranging the locking; however, the second originates from
within mac80211. The kmalloc() call is removed from _usb_read_sync()
by creating a ring buffer pointer in the private area and
allocating the buffer data in the probe routine.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
[This version will apply to 3.2 and earlier. - Larry]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'virt/kvm')
0 files changed, 0 insertions, 0 deletions