From: Andrew Lunn <andrew@lunn.ch>
To: Fan Wu <fanwu01@zju.edu.cn>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
edumazet@google.com, pabeni@redhat.com, andrew+netdev@lunn.ch,
heiko@sntech.de, romain.perier@gmail.com,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, stable@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: arc: fix use-after-free in probe error path
Date: Wed, 4 Mar 2026 23:29:05 +0100 [thread overview]
Message-ID: <b6ac1471-e33a-41d3-9e67-e6463612f05b@lunn.ch> (raw)
In-Reply-To: <20260304025303.145493-1-fanwu01@zju.edu.cn>
On Wed, Mar 04, 2026 at 02:53:03AM +0000, Fan Wu wrote:
> The arc_emac_probe() function calls devm_request_irq() with the
> net_device as the dev_id. However, in the error path of
> emac_rockchip_probe(), free_netdev(ndev) is called before the devm
> cleanup happens. This creates a race window where an interrupt can
> fire and the ISR (arc_emac_intr) will access the already freed
> net_device structure.
It looks like interrupts are only enabled in arc_emac_open(). Have you
seen interrupts before this?
Andrew
next prev parent reply other threads:[~2026-03-04 22:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 2:53 [PATCH] net: ethernet: arc: fix use-after-free in probe error path Fan Wu
2026-03-04 22:29 ` Andrew Lunn [this message]
2026-03-08 8:56 ` 吴凡
2026-03-08 17:59 ` Andrew Lunn
2026-03-08 20:06 ` Fan Wu
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=b6ac1471-e33a-41d3-9e67-e6463612f05b@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fanwu01@zju.edu.cn \
--cc=heiko@sntech.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=romain.perier@gmail.com \
--cc=stable@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