From: Andrew Lunn <andrew@lunn.ch>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: yongxin.liu@windriver.com, LKML <linux-kernel@vger.kernel.org>,
Netdev <netdev@vger.kernel.org>,
david.e.box@linux.intel.com, chao.qin@intel.com,
yong.liang.choong@linux.intel.com, kuba@kernel.org,
platform-driver-x86@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net] platform/x86: intel_pmc_ipc: fix ACPI buffer memory leak
Date: Tue, 25 Nov 2025 01:29:33 +0100 [thread overview]
Message-ID: <72fcaebe-afb6-49ef-a6fd-69aa0f8c7a39@lunn.ch> (raw)
In-Reply-To: <f1124090-a8e4-6220-093a-47c449c98436@linux.intel.com>
> Good catch but this fix doesn't address all possible paths. So please use
> cleanup.h instead:
>
> union acpi_object *obj __free(kfree) = buffer.pointer;
>
> And don't forget to add the #include.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
1.6.5. Using device-managed and cleanup.h constructs¶
Low level cleanup constructs (such as __free()) can be used when
building APIs and helpers, especially scoped iterators. However,
direct use of __free() within networking core and drivers is
discouraged. Similar guidance applies to declaring variables
mid-function.
Andrew
---
pw-bot: cr
next prev parent reply other threads:[~2025-11-25 0:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 7:57 yongxin.liu
2025-11-24 13:39 ` Ilpo Järvinen
2025-11-25 0:29 ` Andrew Lunn [this message]
2025-11-25 1:25 ` Liu, Yongxin
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=72fcaebe-afb6-49ef-a6fd-69aa0f8c7a39@lunn.ch \
--to=andrew@lunn.ch \
--cc=chao.qin@intel.com \
--cc=david.e.box@linux.intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yong.liang.choong@linux.intel.com \
--cc=yongxin.liu@windriver.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®