mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: alexander.antonov@linux.intel.com, linux-kernel@vger.kernel.org,
	x86@kernel.org, ak@linux.intel.com, stable@vger.kernel.org,
	alexey.v.bayduraev@linux.intel.com
Subject: Re: [PATCH] perf/x86/intel/uncore: Fix IIO cleanup mapping procedure for SNR/ICX
Date: Wed, 7 Jul 2021 13:44:07 +0200	[thread overview]
Message-ID: <YOWTh20yJ6uJ8IKK@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <3d634baf-8abe-480d-61ed-ade1945324ee@linux.intel.com>

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
---

  parent reply	other threads:[~2021-07-07 11:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06  9:07 alexander.antonov
2021-07-06 14:12 ` Liang, Kan
2021-07-06 16:17   ` Alexander Antonov
2021-07-06 18:43     ` Liang, Kan
2021-07-07 11:44   ` Peter Zijlstra [this message]
2021-07-06 14:50 ` Greg KH
2021-07-27 13:58 ` [tip: perf/core] " tip-bot2 for Alexander Antonov

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=YOWTh20yJ6uJ8IKK@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.antonov@linux.intel.com \
    --cc=alexey.v.bayduraev@linux.intel.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=x86@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®