From: Ping-Ke Shih <pkshih@realtek.com>
To: "Deren Wu (武德仁)" <Deren.Wu@mediatek.com>,
"nbd@nbd.name" <nbd@nbd.name>,
"lorenzo@kernel.org" <lorenzo@kernel.org>
Cc: "Mingyen Hsieh (謝明諺)" <Mingyen.Hsieh@mediatek.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"Leon Yen (顏良儒)" <Leon.Yen@mediatek.com>,
"Shayne Chen (陳軒丞)" <Shayne.Chen@mediatek.com>,
"Quan Zhou (周全)" <Quan.Zhou@mediatek.com>,
"Sean Wang" <Sean.Wang@mediatek.com>,
"KM Lin (林昆民)" <km.lin@mediatek.com>,
"Soul Huang (黃至昶)" <Soul.Huang@mediatek.com>,
"Posh Sun (孫瑞廷)" <posh.sun@mediatek.com>,
"Eric-SY Chang (張書源)" <Eric-SY.Chang@mediatek.com>,
"CH Yeh (葉志豪)" <ch.yeh@mediatek.com>,
"Robin Chiu (邱國濱)" <robin.chiu@mediatek.com>,
"Ryder Lee" <Ryder.Lee@mediatek.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH 1/2] wifi: mt76: mt7921e: fix use-after-free in free_irq()
Date: Tue, 16 Jan 2024 01:25:22 +0000 [thread overview]
Message-ID: <a55d89a195444b6c98df86607692a26d@realtek.com> (raw)
In-Reply-To: <d02b15d0f76a842970f241db5a557cd37d894562.camel@mediatek.com>
From: Deren Wu (武德仁) <Deren.Wu@mediatek.com>
Sent: Monday, January 15, 2024 8:18 PM
To: nbd@nbd.name; Ping-Ke Shih <pkshih@realtek.com>; lorenzo@kernel.org
Cc: Mingyen Hsieh (謝明諺) <Mingyen.Hsieh@mediatek.com>; linux-mediatek@lists.infradead.org; Leon Yen (顏良儒) <Leon.Yen@mediatek.com>; Shayne Chen (陳軒丞) <Shayne.Chen@mediatek.com>; Quan Zhou (周全) <Quan.Zhou@mediatek.com>; Sean Wang <Sean.Wang@mediatek.com>; KM Lin (林昆民) <km.lin@mediatek.com>; Soul Huang (黃至昶) <Soul.Huang@mediatek.com>; Posh Sun (孫瑞廷) <posh.sun@mediatek.com>; Eric-SY Chang (張書源) <Eric-SY.Chang@mediatek.com>; CH Yeh (葉志豪) <ch.yeh@mediatek.com>; Robin Chiu (邱國濱) <robin.chiu@mediatek.com>; Ryder Lee <Ryder.Lee@mediatek.com>; linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] wifi: mt76: mt7921e: fix use-after-free in free_irq()
>
> Here is the snapshot. The code is trying to direct access this irq
> handler after deregisering, for IRQF_SHARED case. synchronize_irq() and
> tasklet_kill() are all done in previous steps. We need to stop the
> extra call here. If there are any alternative, that would be
> appreciated.
>
> /*
> * It's a shared IRQ -- the driver ought to be prepared for an IRQ
> * event to happen even now it's being freed, so let's make sure that
> * is so by doing an extra call to the handler ....
> *
> * ( We do this after actually deregistering it, to make sure that a
> * 'real' IRQ doesn't run in parallel with our fake. )
> */
> if (action->flags & IRQF_SHARED) {
> local_irq_save(flags);
> action->handler(irq, dev_id);
> local_irq_restore(flags);
> }
>
I missed this point. Sorry for the noise.
prev parent reply other threads:[~2024-01-16 1:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-13 9:00 [PATCH 1/2] wifi: mt76: mt7921e: fix use-after-free in free_irq() Deren Wu
2024-01-13 9:00 ` [PATCH 2/2] wifi: mt76: mt7925e: " Deren Wu
2024-01-15 2:03 ` [PATCH 1/2] wifi: mt76: mt7921e: " Ping-Ke Shih
2024-01-15 12:18 ` Deren Wu (武德仁)
2024-01-16 1:25 ` Ping-Ke Shih [this message]
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=a55d89a195444b6c98df86607692a26d@realtek.com \
--to=pkshih@realtek.com \
--cc=Deren.Wu@mediatek.com \
--cc=Eric-SY.Chang@mediatek.com \
--cc=Leon.Yen@mediatek.com \
--cc=Mingyen.Hsieh@mediatek.com \
--cc=Quan.Zhou@mediatek.com \
--cc=Ryder.Lee@mediatek.com \
--cc=Sean.Wang@mediatek.com \
--cc=Shayne.Chen@mediatek.com \
--cc=Soul.Huang@mediatek.com \
--cc=ch.yeh@mediatek.com \
--cc=km.lin@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=posh.sun@mediatek.com \
--cc=robin.chiu@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