Messages in this thread | | | Date | Wed, 7 Jul 2021 13:44:07 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH] perf/x86/intel/uncore: Fix IIO cleanup mapping procedure for SNR/ICX |
| |
On Tue, Jul 06, 2021 at 10:12:55AM -0400, Liang, Kan wrote: > > > On 7/6/2021 5:07 AM, alexander.antonov@linux.intel.com wrote: > > From: Alexander Antonov <alexander.antonov@linux.intel.com> > > > > Cleanup mapping procedure for IIO PMU is needed to free memory which was > > allocated for topology data and for attributes in IIO mapping > > attribute_group. > > Current implementation of this procedure for Snowridge and Icelake Server > > platforms doesn't free allocated memory that can be a reason for memory > > leak issue. > > Fix the issue with IIO cleanup mapping procedure for these platforms > > to release allocated memory. > > > > Fixes: 10337e95e04c ("perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on ICX") > > > > Signed-off-by: Alexander Antonov <alexander.antonov@linux.intel.com> > > The patch looks good to me. > > Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Thanks!
--- Subject: perf/x86/intel/uncore: Fix IIO cleanup mapping procedure for SNR/ICX From: Alexander Antonov <alexander.antonov@linux.intel.com> Date: Tue, 06 Jul 2021 12:07:23 +0300
From: Alexander Antonov <alexander.antonov@linux.intel.com>
skx_iio_cleanup_mapping() is re-used for snr and icx, but in those cases it fails to use the appropriate XXX_iio_mapping_group and as such fails to free previously allocated resources, leading to memory leaks.
Fixes: 10337e95e04c ("perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on ICX") Signed-off-by: Alexander Antonov <alexander.antonov@linux.intel.com> [peterz: Changelog] Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210706090723.41850-1-alexander.antonov@linux.intel.com ---
| |