From: Ben Greear <greearb@candelatech.com>
To: Khalid Aziz <khalid@gonehiking.org>,
nbd@nbd.name, lorenzo.bianconi83@gmail.com,
ryder.lee@mediatek.com, shayne.chen@mediatek.com,
sean.wang@mediatek.com, kvalo@kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, matthias.bgg@gmail.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [Bug] mt7921e driver in 5.16 causes kernel panic
Date: Tue, 11 Jan 2022 15:31:23 -0800 [thread overview]
Message-ID: <7b15fa7c-9130-db8c-875e-8c0eb1dcc530@candelatech.com> (raw)
In-Reply-To: <5cee9a36-b094-37a0-e961-d7404b3dafe2@gonehiking.org>
On 1/11/22 3:17 PM, Khalid Aziz wrote:
> I am seeing an intermittent bug in mt7921e driver. When the driver module is loaded
> and is being initialized, almost every other time it seems to write to some wild
> memory location. This results in driver failing to initialize with message
> "Timeout for driver own" and at the same time I start to see "Bad page state" messages
> for random processes. Here is the relevant part of dmesg:
Please see if this helps?
From: Ben Greear <greearb@candelatech.com>
If the nic fails to start, it is possible that the
reset_work has already been scheduled. Ensure the
work item is canceled so we do not have use-after-free
crash in case cleanup is called before the work item
is executed.
This fixes crash on my x86_64 apu2 when mt7921k radio
fails to work. Radio still fails, but OS does not
crash.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
drivers/net/wireless/mediatek/mt76/mt7921/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index 6073bedaa1c08..9b33002dcba4a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -272,6 +272,7 @@ static void mt7921_stop(struct ieee80211_hw *hw)
cancel_delayed_work_sync(&dev->pm.ps_work);
cancel_work_sync(&dev->pm.wake_work);
+ cancel_work_sync(&dev->reset_work);
mt76_connac_free_pending_tx_skbs(&dev->pm, NULL);
mt7921_mutex_acquire(dev);
--
2.26.3
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2022-01-11 23:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 23:17 [Bug] mt7921e driver in 5.16 causes kernel panic Khalid Aziz
2022-01-11 23:31 ` Ben Greear [this message]
2022-01-11 23:58 ` Khalid Aziz
2022-01-12 0:05 ` Ben Greear
[not found] <c3a66426-e6a0-4fd2-dc09-85181c96b755@gonehiking.org--annotate>
2022-01-12 0:49 ` sean.wang
2022-01-12 2:16 ` Khalid Aziz
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=7b15fa7c-9130-db8c-875e-8c0eb1dcc530@candelatech.com \
--to=greearb@candelatech.com \
--cc=davem@davemloft.net \
--cc=khalid@gonehiking.org \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
/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;
as well as URLs for NNTP newsgroup(s).