All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/3] net: airoha: Add airoha_ppe_dev struct definition
Date: Fri, 22 Aug 2025 08:58:25 +0200	[thread overview]
Message-ID: <aKgVEYMftYgdynxw@lore-rh-laptop> (raw)
In-Reply-To: <20250821183453.4136c5d3@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

> 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@oracle.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;
> > +	}

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-08-22 12:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 12:21 [PATCH net-next 0/3] net: airoha: Add PPE support for RX wlan offload Lorenzo Bianconi
2025-08-19 12:21 ` [PATCH net-next 1/3] net: airoha: Rely on airoha_eth struct in airoha_ppe_flow_offload_cmd signature Lorenzo Bianconi
2025-08-19 12:21 ` [PATCH net-next 2/3] net: airoha: Add airoha_ppe_dev struct definition Lorenzo Bianconi
2025-08-22  1:34   ` Jakub Kicinski
2025-08-22  6:58     ` Lorenzo Bianconi [this message]
2025-08-22 14:04       ` Jakub Kicinski
2025-08-22 14:26         ` Lorenzo Bianconi
2025-08-22 14:38           ` Jakub Kicinski
2025-08-19 12:21 ` [PATCH net-next 3/3] net: airoha: Introduce check_skb callback in ppe_dev ops Lorenzo Bianconi
2025-08-22  1:34 ` [PATCH net-next 0/3] net: airoha: Add PPE support for RX wlan offload Jakub Kicinski
2025-08-22  7:00   ` Lorenzo Bianconi

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=aKgVEYMftYgdynxw@lore-rh-laptop \
    --to=lorenzo@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.