[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<SJ0PR11MB507228758576C4474EC14EC2E5D1A@SJ0PR11MB5072.namprd11.prod.outlook.com>
Date: Tue, 25 Nov 2025 01:25:31 +0000
From: "Liu, Yongxin" <Yongxin.Liu@...driver.com>
To: Andrew Lunn <andrew@...n.ch>,
Ilpo Järvinen
<ilpo.jarvinen@...ux.intel.com>
CC: LKML <linux-kernel@...r.kernel.org>, Netdev <netdev@...r.kernel.org>,
"david.e.box@...ux.intel.com" <david.e.box@...ux.intel.com>,
"chao.qin@...el.com" <chao.qin@...el.com>,
"yong.liang.choong@...ux.intel.com" <yong.liang.choong@...ux.intel.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"platform-driver-x86@...r.kernel.org"
<platform-driver-x86@...r.kernel.org>,
"stable@...r.kernel.org"
<stable@...r.kernel.org>
Subject: RE: [PATCH net] platform/x86: intel_pmc_ipc: fix ACPI buffer memory
leak
> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Tuesday, November 25, 2025 8:30
> To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> Cc: Liu, Yongxin <Yongxin.Liu@...driver.com>; LKML <linux-
> kernel@...r.kernel.org>; Netdev <netdev@...r.kernel.org>;
> david.e.box@...ux.intel.com; chao.qin@...el.com;
> yong.liang.choong@...ux.intel.com; kuba@...nel.org; platform-driver-
> x86@...r.kernel.org; stable@...r.kernel.org
> Subject: Re: [PATCH net] platform/x86: intel_pmc_ipc: fix ACPI buffer
> memory leak
>
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and
> know the content is safe.
>
> > 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
Thank you Ilpo and Andrew for your valuable review.
I will send a V2 to cover all possible paths.
Thanks,
Yongxin
>
> ---
> pw-bot: cr
Powered by blists - more mailing lists