Bug 210857
Summary: | Crash in mt7601u driver | ||
---|---|---|---|
Product: | Drivers | Reporter: | Matthias (matthias_berndt) |
Component: | network-wireless | Assignee: | drivers_network-wireless (drivers_network-wireless) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | lorenzo.bianconi83, mozlima |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 5.9.16-200.fc33.x86_64 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
output of journalctl -kb -1
mt7601u_crash.patch kernel log when unplugging the device from USB port memory-exposure.txt journal kernel log when unplugging the device from USB port journal unplugging the device 0001-mt7601u-fix-kernel-crash-unplugging-the-device.patch journal-patch-calibration-EPROTO-0001unplug |
Description
Matthias
2020-12-22 17:30:17 UTC
Created attachment 294301 [details]
output of journalctl -kb -1
Oh, and this crash recently caused me to lose some of my DOOM savegames Having this problem in 2 PC with mt7601u Get this crash then after some second/minute the system freeze and I need hard reset Before Kernel 5.10.3 the crash was happening but not freezing the PC I have noticed that this happens also when I unplug the USB Wifi adapter from the computer, so that should make it much easier to debug. These things are avaiable for less than 3 € these days, so if anybody wants to work on this, I don't mind having one of these shipped to them. Created attachment 294625 [details]
mt7601u_crash.patch
Hi Matthias and Moises, can you please try the attached patch (mt7601u_crash.patch)? (In reply to Lorenzo Bianconi from comment #6) > Hi Matthias and Moises, > > can you please try the attached patch (mt7601u_crash.patch)? Hi Lorenzo, it seems that that patch is already contained in Linux 5.10.7. That isn't shipped with Fedora just yet, so I have compiled it myself and I'm now running it. As I said before, I've seen this driver crash during normal operation (e. g. large downloads, or even just watching videos online). It doesn't happen all that often, so I'm going to see what happens for a few days and report back then. But I have also seen this driver crash when unplugging it from the USB port, and this is still happening. I'm attaching the kernel log output. Created attachment 294637 [details]
kernel log when unplugging the device from USB port
Created attachment 294639 [details]
memory-exposure.txt
Hey,
I have just experienced another issue with this new kernel 5.10.7.
The internet suddenly stopped working and I found a message in the kernel log:
usercopy: Kernel memory exposure attempt detected from SLUB object 'skbuff_head_cache' (offset 132, size 1208)!
I'm attaching the relevant part of the kernel log.
It didn't crash the machine at least and I could reboot it without problems, so I guess
that's an improvement. But this time the stack trace doesn't mention mt7601u,
although it still seems to be network-related.
Let me know if there's anything more I can do. When I built the kernel it also built
a bunch of debug rpm packages. Can those be used to provide a more helpful stack
trace perhaps?
All the best,
Matthias
Ok, this new bug seems to be happening a lot. I've been running the 5.10.7 kernel for maybe an hour or two now and it already occurred twice. Sorry to be the bearer of bad news :-( Created attachment 294641 [details]
journal
Unplugging the device from USB port
(In reply to Lorenzo Bianconi from comment #6) > Hi Matthias and Moises, > > can you please try the attached patch (mt7601u_crash.patch)? Hi Lorenzo, After the patch on kernel 5.10.7 I confirm the drive crash when unplugging. The mouse light keep ON and the fans start running fast. I need to hard reset the PC No crash on normal usage, using for 2 hours Thanks! (In reply to Matthias from comment #7) > (In reply to Lorenzo Bianconi from comment #6) > > Hi Matthias and Moises, > > > > can you please try the attached patch (mt7601u_crash.patch)? > > > Hi Lorenzo, > > it seems that that patch is already contained in Linux 5.10.7. That isn't > shipped with Fedora just yet, so I have compiled it myself and I'm now > running it. > > As I said before, I've seen this driver crash during normal operation (e. g. > large downloads, or even just watching videos online). It doesn't happen all > that often, so I'm going to see what happens for a few days and report back > then. > > > But I have also seen this driver crash when unplugging it from the USB port, > and this is still happening. I'm attaching the kernel log output. regarding the normal operation crash, mt7601u_crash.patch is wrong. Can you please try one? https://patchwork.kernel.org/project/linux-wireless/patch/62b2380c8c2091834cfad05e1059b55f945bd114.1610643952.git.lorenzo@kernel.org/ regarding the disconnect issue, can you please try this commit to see if it helps? https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=0e40dbd56d67a5b01b13f4bfb62b470cd99125cd I'm compiling a kernel with the first of your proposed patches, the put_page one. I'll try running it for a few days and report what I find. Ah, never mind, I'll just compile a kernel with both of the patches applied. Created attachment 294657 [details]
kernel log when unplugging the device from USB port
Hey there,
I'm sorry to report that the -EPROTO patch didn't fix the USB unplugging issue. It again crashed immediately after unplugging, and you can find the log in the attachment.
I'll keep running this kernel for a few more days to see if it still has issues during normal use.
Thank you for your efforts!
Created attachment 294659 [details]
journal unplugging the device
journal unplugging the device
Unplugging the device still crash Work if remove the module before unplug sudo modprobe -r mt7601u Testing normal use Hey there, I've been using this patched driver over the weekend and downloaded several gigabytes of data. I have witnessed no more crashes, so apparently this fixes the issue. Thanks, Lorenzo! As I mentioned before, the USB disconnect issue is still there, but this is not really an issue for me because there isn't really any reason to ever unplug it on this particular machine. But I'll be happy to help if you need me to test any more patches. Created attachment 294709 [details]
0001-mt7601u-fix-kernel-crash-unplugging-the-device.patch
Hi Matthias and Moises,
can you please try this patch for the unplugging kernel crash?
Should I apply only this patch or both this one and the other one (-EPROTO)? (In reply to Lorenzo Bianconi from comment #20) > Created attachment 294709 [details] > 0001-mt7601u-fix-kernel-crash-unplugging-the-device.patch > > Hi Matthias and Moises, > > can you please try this patch for the unplugging kernel crash? Hi Patched on kernel 5.10.7: mt7601u: check the status of device in calibration mt7601u: process URBs in status EPROTO properly 0001-mt7601u-fix-kernel-crash-unplugging-the-device.patch Everything working! Thank you Crash after some minutes of normal usage Testing with: mt7601u: check the status of device in calibration mt7601u: process URBs in status EPROTO properly 0001-mt7601u-fix-kernel-crash-unplugging-the-device mt7601u: fix rx buffer refcounting (In reply to Moises Lima from comment #23) > Crash after some minutes of normal usage > > Testing with: > mt7601u: check the status of device in calibration > mt7601u: process URBs in status EPROTO properly > 0001-mt7601u-fix-kernel-crash-unplugging-the-device > mt7601u: fix rx buffer refcounting Can you provide the crashlog? Hi (In reply to Moises Lima from comment #23) > Crash after some minutes of normal usage > > Testing with: > mt7601u: check the status of device in calibration > mt7601u: process URBs in status EPROTO properly > 0001-mt7601u-fix-kernel-crash-unplugging-the-device > mt7601u: fix rx buffer refcounting Hi Moises, I run wireless-drivers-next tree + mt7601u fixes [0] for ~ 6h running TCP bidirectional traffic w/o any crash. Can you please give it a whirl? [0] https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt7601u_fixes Created attachment 294743 [details]
journal-patch-calibration-EPROTO-0001unplug
Journal of the crash with patched kernel 5.10.7
mt7601u: check the status of device in calibration
mt7601u: process URBs in status EPROTO properly
0001-mt7601u-fix-kernel-crash-unplugging-the-device.patch
Hi Lorenzo, Tested with (kernel 5.10.7) patched: mt7601u: check the status of device in calibration (wireless-drivers-next tree) mt7601u: process URBs in status EPROTO properly 0001-mt7601u-fix-kernel-crash-unplugging-the-device mt7601u: fix rx buffer refcounting No crash on normal usage or unplugging the device (since 2021-01-18 03:07:18 UTC) Should I test the next version too? (In reply to Moises Lima from comment #27) > Hi Lorenzo, > > Tested with (kernel 5.10.7) patched: > mt7601u: check the status of device in calibration (wireless-drivers-next > tree) > mt7601u: process URBs in status EPROTO properly > 0001-mt7601u-fix-kernel-crash-unplugging-the-device > mt7601u: fix rx buffer refcounting > > No crash on normal usage or unplugging the device (since 2021-01-18 03:07:18 > UTC) > > Should I test the next version too? Hi Moises, so no more issues applying those patches, correct? If so, no more tests needed. Hi Lorenzo, Yes, everything is fixed Thank you! 👍🎉🥳 |