staging: rtl8188eu: Fix module loading from tasklet for WEP encryption
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 3 Jan 2019 02:12:47 +0000 (20:12 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2019 21:04:29 +0000 (22:04 +0100)
commitf64231cb4f133c3638f210b81bae9fbffc0841fa
treefa986cdc8675c57f282e57b618c87738e425a941
parentce588054801d03ccb956e088e679baed1cf34105
staging: rtl8188eu: Fix module loading from tasklet for WEP encryption

commit 7775665aadc48a562051834a73519129bf717d73 upstream.

Commit 2b2ea09e74a5 ("staging:r8188eu: Use lib80211 to decrypt WEP-frames")
causes scheduling while atomic bugs followed by a hard freeze whenever
the driver tries to connect to a WEP-encrypted network. Experimentation
showed that the freezes were eliminated when module lib80211 was
preloaded, which can be forced by calling lib80211_get_crypto_ops()
directly rather than indirectly through try_then_request_module().
With this change, no BUG messages are logged.

Fixes: 2b2ea09e74a5 ("staging:r8188eu: Use lib80211 to decrypt WEP-frames")
Cc: Stable <stable@vger.kernel.org> # v4.17+
Cc: Michael Straube <straube.linux@gmail.com>
Cc: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_security.c