mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: Miaoqian Lin <linmq006@gmail.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>, Yangbo Lu <yangbo.lu@nxp.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info
Date: Wed, 9 Mar 2022 12:19:03 -0800	[thread overview]
Message-ID: <e68aa1f1-233f-6e5b-21a6-0443d565ca65@intel.com> (raw)
In-Reply-To: <20220309091149.775-1-linmq006@gmail.com>

 > Subject: [PATCH] ethtool: Fix refcount leak in gfar_get_ts_info

should be:
[PATCH net v2] gianfar: ethtool: Fix refcount leak in gfar_get_ts_info

On 3/9/2022 1:11 AM, Miaoqian Lin wrote:
> The of_find_compatible_node() function returns a node pointer with
> refcount incremented, We should use of_node_put() on it when done
> Add the missing of_node_put() to release the refcount.
> 
> Fixes: 7349a74ea75c ("net: ethernet: gianfar_ethtool: get phc index through drvdata")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
>   drivers/net/ethernet/freescale/gianfar_ethtool.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
> index ff756265d58f..9a2c16d69e2c 100644
> --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
> +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
> @@ -1464,6 +1464,7 @@ static int gfar_get_ts_info(struct net_device *dev,
>   	ptp_node = of_find_compatible_node(NULL, NULL, "fsl,etsec-ptp");
>   	if (ptp_node) {
>   		ptp_dev = of_find_device_by_node(ptp_node);
> +		of_node_put(ptp_node);
>   		if (ptp_dev)
>   			ptp = platform_get_drvdata(ptp_dev);
>   	}

If you fix the subject and resend a v2, you can add
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>

  reply	other threads:[~2022-03-09 20:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09  9:11 Miaoqian Lin
2022-03-09 20:19 ` Jesse Brandeburg [this message]
2022-03-10  1:53   ` [PATCH net v2] gianfar: " Miaoqian Lin
2022-03-10  7:23     ` Claudiu Manoil
2022-03-10 20:30     ` patchwork-bot+netdevbpf
2022-03-10 20:30 ` [PATCH] " patchwork-bot+netdevbpf
2022-03-10 20:36   ` Jakub Kicinski

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=e68aa1f1-233f-6e5b-21a6-0443d565ca65@intel.com \
    --to=jesse.brandeburg@intel.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linmq006@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yangbo.lu@nxp.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®