[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ryt5qoanum7x4ylmnx7plhmuykp5xxu7m53xwrg336hqfr2kfx@ol7pq2m5px2n>
Date: Thu, 13 Nov 2025 17:05:19 +0530
From: Abdun Nihaal <nihaal@....iitm.ac.in>
To: Cezary Rojewski <cezary.rojewski@...el.com>
Cc: liam.r.girdwood@...ux.intel.com, peter.ujfalusi@...ux.intel.com,
yung-chuan.liao@...ux.intel.com, ranjani.sridharan@...ux.intel.com, kai.vehmanen@...ux.intel.com,
pierre-louis.bossart@...ux.dev, broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: intel: avs: Fix potential memory leak in
avs_pci_probe()
On Thu, Nov 13, 2025 at 12:14:30PM +0100, Cezary Rojewski wrote:
> I'd suggest to be strict, no need for lengthy message when addressing simple
> problem. Your title already answers _what_?, the message shall answer
> _why_?. Example:
>
> snd_hdac_ext_bus_get_ml_capabilities() may fail when allocating LINK
> resources.
Sure, I'll shorten the commit message.
> > Compile tested only. Issue found using static analysis.
>
> Well, it's good to do at least a simple functional test before sending, see
> below.
I don't have the hardware to test it.
> > snd_hdac_ext_stream_free_all(bus);
> > err_init_streams:
> > + snd_hdac_ext_link_free_all(bus);
> > +err_ml_capabilities:
>
> Don't believe that's correct. -ENOMEM may be returned when allocating
> resources for an entry N>0. Skipping snd_hdac_ext_link_free_all() may leave
> things at status quo - memory leak.
>
> > iounmap(adev->dsp_ba);
Yes, I missed that. Will fix it and send a v2 patch.
Thanks for reviewing.
Regards,
Nihaal
Powered by blists - more mailing lists