]> git.baikalelectronics.ru Git - kernel.git/commit
rtlwifi: Fix scheduling while atomic bug
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 2 Feb 2013 21:55:00 +0000 (15:55 -0600)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 Feb 2013 21:41:56 +0000 (16:41 -0500)
commitd7a4f824fbf4fb2f49cf1d914ac9dfda2ad78ce1
tree26cde444b6ce2004888599d4b6ec59ee4b58bd65
parent59a8da3ca290477936f2f16292ec4c60a9a51c4f
rtlwifi: Fix scheduling while atomic bug

Kernel commits b8229d3 and 54b6e5f changed the locking in rtl_lps_leave()
from a spinlock to a mutex by doing the calls indirectly from a work queue
to reduce the time that interrupts were disabled. This change was fine for
most systems; however a scheduling while atomic bug was reported in
https://bugzilla.redhat.com/show_bug.cgi?id=903881. The backtrace indicates
that routine rtl_is_special(), which calls rtl_lps_leave() in three places
was entered in atomic context. These direct calls are replaced by putting a
request on the appropriate work queue.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-and-tested-by: Nathaniel Doherty <ntdoherty@gmail.com>
Cc: Nathaniel Doherty <ntdoherty@gmail.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/base.c