From: Michael Straube <straube.linux@gmail.com>
To: Ivan Safonov <insafonov@gmail.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "staging:r8188eu: use lib80211 CCMP decrypt"
Date: Tue, 1 Jan 2019 20:45:36 +0100 [thread overview]
Message-ID: <f36f6d59-0737-6fcd-8189-068bd308f32b@gmail.com> (raw)
In-Reply-To: <4dd17d38-8c4d-b5db-1091-edba0d95cadf@gmail.com>
On 1/1/19 10:02 AM, Ivan Safonov wrote:
> I suggested a patch for loading modules from interruptible mode, but this patch remained unclaimed ( http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-August/124851.html ).
>
So with these changes try_then_request_module() would work properly?
> For some reason I thought that this patch had been removed and did not track the fate of this code ( http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-August/124573.html ).
>
I reverted that patch (there are conflicts meanwhile) and removed
try_then_request_module() in rtw_aes_encrypt() and it looks good.
Perhaps the same applies for the reverted TKIP changes?
Michael
> On 1/1/19 5:17 AM, Larry Finger wrote:
>> On 12/30/18 12:39 PM, Michael Straube wrote:
>>> Commit 6bd082af7e36 ("staging:r8188eu: use lib80211 CCMP decrypt")
>>> is causing hardfreeze whenever the driver tries to connect to my wifi
>>> network. That makes the driver unusable on my system. Reverting the
>>> commit fixes the issue and the driver works properly.
>>>
>>> Dec 29 19:21:17 gentoo kernel: BUG: scheduling while atomic: swapper/6/0/0x00000100
>>
>> Michael,
>>
>> I have verified the freezes that you see. Although I have not been able to capture the console dump, I think we are likely seeing the same problem.
>>
>> I do have a work-around in that I have not gotten any freezes when I force module lib80211_crypt_ccmp to be loaded before I load module r8188eu. This clue was used in finding what seems to be a good fix.
>>
>> I do not know anything about demand loading of modules using try_then_request_module(); however, I noticed that the macro actually calls __request_module(), which has the following comment:
>>
>> * Load a module using the user mode module loader. The function returns
>> * zero on success or a negative errno code or positive exit code from
>> * "modprobe" on failure. Note that a successful module load does not mean
>> * the module did not then unload and exit on an error of its own. Callers
>> * must check that the service they requested is now available not blindly
>> * invoke it.
>>
>> I note that it says "user mode module loader". Routine rtw_aes_decrypt() is likely inside some sort of locking, which leads to the "scheduling while atomic" bug that you see. As a result, I suspect that the module is not loaded, and that leads to the NULL dereference when the module is accessed. Please try the one-line patch attached, which forces lib80211 to load when r8188eu is loaded. With this patch, I have been connected to an AES-encrypted AP for nearly 3 hours with no problems.
>>
>> Larry
>>
>>
next prev parent reply other threads:[~2019-01-01 19:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-30 18:39 [PATCH] Revert "staging:r8188eu: use lib80211 CCMP decrypt" Michael Straube
2019-01-01 2:17 ` Larry Finger
2019-01-01 9:02 ` Ivan Safonov
2019-01-01 19:45 ` Michael Straube [this message]
2019-01-01 21:38 ` Larry Finger
2019-01-02 19:03 ` Ivan Safonov
2019-01-01 19:31 ` Michael Straube
2019-01-02 1:06 ` Larry Finger
2019-01-02 19:35 ` Ivan Safonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f36f6d59-0737-6fcd-8189-068bd308f32b@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=insafonov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox