From: Andrew Lunn <andrew@lunn.ch>
To: 赵金明 <zhaojinming@uniontech.com>
Cc: horms <horms@kernel.org>, andrew+netdev <andrew+netdev@lunn.ch>,
davem <davem@davemloft.net>, edumazet <edumazet@google.com>,
kuba <kuba@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"madalin.bucur" <madalin.bucur@nxp.com>,
netdev <netdev@vger.kernel.org>, pabeni <pabeni@redhat.com>,
"sean.anderson" <sean.anderson@linux.dev>
Subject: Re: [PATCH v2 2/2] net: fman: use devm_kzalloc() for fman and rely on devres
Date: Tue, 23 Jun 2026 13:22:10 +0200 [thread overview]
Message-ID: <f0a6fd09-2fab-4bb4-85ae-82f8d383452c@lunn.ch> (raw)
In-Reply-To: <823580887DE24145+2026062314162397367012@uniontech.com>
On Tue, Jun 23, 2026 at 02:16:25PM +0800, 赵金明 wrote:
> Hi Andrew,
>
> Thank you for pointing me to the netdev maintainer documentation. I have
> read section 1.7.4 and I understand the concern about standalone
> cleanup conversions.
>
> I would like to clarify the actual motivation behind the
> devm_kzalloc() change. While it may appear to be a simple devm_
> conversion on the surface, it is in fact fixing a use-after-free race
> condition in the IRQF_SHARED error paths. Let me explain the problem
> in detail.
Please make the commit message explain what the fix is, rather then
saying converting to devm_.
But i also hope you also see why we don't like devm_ conversions,
because developers get them wrong like this. And all too often, they
do the conversion without actual hardware to test it with. So it
results in more bugs, not less.
Andrew
next prev parent reply other threads:[~2026-06-23 11:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 7:54 [PATCH] net: fman: fix clock and device node leak in probe error paths ZhaoJinming
2026-06-18 8:08 ` Madalin Bucur
2026-06-19 12:13 ` Simon Horman
2026-06-22 9:05 ` [PATCH v2 1/2] net: fman: fix clk reference leak in read_dts_node() ZhaoJinming
2026-06-22 9:05 ` [PATCH v2 2/2] net: fman: use devm_kzalloc() for fman and rely on devres ZhaoJinming
2026-06-22 10:36 ` Andrew Lunn
2026-06-23 6:16 ` 赵金明
2026-06-23 11:22 ` Andrew Lunn [this message]
2026-06-24 9:49 ` ZhaoJinming
2026-06-24 9:49 ` [PATCH v3] net: fman: fix use-after-free on IRQF_SHARED handler after probe failure ZhaoJinming
2026-06-25 16:42 ` Simon Horman
2026-06-26 9:53 ` 赵金明
2026-06-26 16:23 ` Simon Horman
2026-06-22 10:33 ` [PATCH v2 1/2] net: fman: fix clk reference leak in read_dts_node() Andrew Lunn
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=f0a6fd09-2fab-4bb4-85ae-82f8d383452c@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@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 \
--cc=zhaojinming@uniontech.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
all inboxes | Powered by JetHome®