[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKgVEYMftYgdynxw@lore-rh-laptop>
Date: Fri, 22 Aug 2025 08:58:25 +0200
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] net: airoha: Add airoha_ppe_dev struct
definition
> On Tue, 19 Aug 2025 14:21:07 +0200 Lorenzo Bianconi wrote:
> > + pdev = of_find_device_by_node(np);
> > +
>
> did you mean to put the of_node_put() here?
>
> > + if (!pdev) {
> > + dev_err(dev, "cannot find device node %s\n", np->name);
> > + of_node_put(np);
> > + return ERR_PTR(-ENODEV);
> > + }
> > + of_node_put(np);
I moved the of_node_put() here (and in the if branch) in order to fix a similar
issue fixed by Alok for airoha_npu.
commit 3cd582e7d0787506990ef0180405eb6224fa90a6
Author: Alok Tiwari <alok.a.tiwari@...cle.com>
Date: Tue Jul 15 07:30:58 2025 -0700
net: airoha: fix potential use-after-free in airoha_npu_get()
Regards,
Lorenzo
> > +
> > + if (!try_module_get(THIS_MODULE)) {
> > + dev_err(dev, "failed to get the device driver module\n");
> > + goto error_pdev_put;
> > + }
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists