]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtlwifi: rtl8192c: Prevent sleeping from invalid context in rtl8192cu
authorLarry Finger <Larry.Finger@lwfinger.net>
Fri, 2 Mar 2012 21:23:36 +0000 (15:23 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 17:31:51 +0000 (10:31 -0700)
commit985f1729c3be24774673d3fc09ae5959c3db65e8
tree2a4e1eeab3f67b1b8bca3704e949d004744f776c
parent68b3290b853c504ef12b9483c2d89e744d255ebc
rtlwifi: rtl8192c: Prevent sleeping from invalid context in rtl8192cu

commit ebecdcc12fed5d3c81853dea61a0a78a5aefab52 upstream.

When driver rtl8192cu is used with the debug level set to 3 or greater,
the result is "sleeping function called from invalid context" due to
an rcu_read_lock() call in the DM refresh routine in driver rtl8192c.
This lock is not necessary as the USB driver does not use the struct
being protected, thus the lock is set only when a PCI interface is
active.

This bug is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42775.

Reported-by: Ronald Wahl <ronald.wahl@raritan.com>
Tested-by: Ronald Wahl <ronald.wahl@raritan.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ronald Wahl <ronald.wahl@raritan.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c