mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Weigang He <geoffreyhe2@gmail.com>, linux-pm@vger.kernel.org
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Lukasz Luba <lukasz.luba@arm.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCH] thermal/of: fix device node refcount leak in thermal_of_cm_lookup()
Date: Sat, 17 Jan 2026 17:20:41 +0100	[thread overview]
Message-ID: <eaf05847-b5c0-44b7-a619-7119d569df17@web.de> (raw)
In-Reply-To: <20260116073002.86597-1-geoffreyhe2@gmail.com>

…
> Add the missing of_node_put() calls on all paths to prevent the

How do you think about to use an attribute like “__free(device_node)” instead?
https://elixir.bootlin.com/linux/v6.19-rc5/source/include/linux/of.h#L138
https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/thermal/thermal_of.c#L277-L303


Was such an improvable implementation detail detected by any known source code
analysis approaches?


> reference count leak.

Would you like to use this term also in the summary phrase?

Regards,
Markus

      reply	other threads:[~2026-01-17 16:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16  7:30 Weigang He
2026-01-17 16:20 ` Markus Elfring [this message]

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=eaf05847-b5c0-44b7-a619-7119d569df17@web.de \
    --to=markus.elfring@web.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=geoffreyhe2@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.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

all inboxes | Powered by JetHome®