From: ZhaoJinming <zhaojinming@uniontech.com>
To: pabeni@redhat.com
Cc: andrew+netdev@lunn.ch, andrew@lunn.ch, davem@davemloft.net,
edumazet@google.com, horms@kernel.org, kuba@kernel.org,
linux-kernel@vger.kernel.org, madalin.bucur@nxp.com,
netdev@vger.kernel.org, sean.anderson@linux.dev,
zhaojinming@uniontech.com
Subject: Re: [PATCH] net: fman: guard IRQ handlers against pre-init interrupt
Date: Thu, 2 Jul 2026 17:28:14 +0800 [thread overview]
Message-ID: <20260702092815.1206704-1-zhaojinming@uniontech.com> (raw)
In-Reply-To: <e1f8aec9-751b-4a51-ab09-ca3c37522e30@redhat.com>
Hi Paolo,
Thanks for the review. You are right -- the irq_ready approach was
fundamentally flawed, and moving IRQ registration after init is the
correct fix.
I have updated the series to address your feedback:
Patch 1/2: Move devm_request_irq() out of read_dts_node() and into
fman_probe(), after fman_config() and fman_init() have completed.
This eliminates both the pre-init NULL dereference and the UAF on
probe failure in a single change. A separate UAF fix patch is no
longer needed.
Patch 2/2: Add proper error cleanup in fman_probe(). The existing
driver had no unified cleanup path -- fman_init() and devm_request_irq()
failure paths leaked fman and its sub-resources. This patch adds
fman_free_resources() and fman_muram_finish() to release everything
correctly, including explicitly freeing IRQs before kfree(fman) to
avoid reintroducing the UAF window on the cleanup path itself.
Patches are against net-next/master.
v1 patch (irq_ready + READ_ONCE) is dropped. v3 UAF fix patch is
superseded.
Thanks,
Jinming
next prev parent reply other threads:[~2026-07-02 9:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 8:45 [PATCH] net: fman: guard IRQ handlers against pre-init interrupt ZhaoJinming
2026-07-01 15:06 ` Paolo Abeni
2026-07-02 9:28 ` ZhaoJinming [this message]
2026-07-02 9:28 ` [PATCH v2 1/2] net: fman: move IRQ registration after init to prevent NULL deref and UAF ZhaoJinming
2026-07-02 20:42 ` Andrew Lunn
2026-07-03 7:54 ` 赵金明
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=20260702092815.1206704-1-zhaojinming@uniontech.com \
--to=zhaojinming@uniontech.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=madalin.bucur@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sean.anderson@linux.dev \
/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