All of lore.kernel.org
 help / color / mirror / Atom feed
From: sudeep.holla@arm.com (Sudeep Holla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH][V3] ARM: pmu: fix memory leak due to early return not freeing irqs
Date: Mon, 18 May 2015 14:27:06 +0100	[thread overview]
Message-ID: <5559E8AA.5080609@arm.com> (raw)
In-Reply-To: <1431953873-12283-1-git-send-email-colin.king@canonical.com>



On 18/05/15 13:57, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Recent commit 338d9dd3e2ae ("ARM: 8351/1: perf: don't warn about
> missing interrupt-affinity property for PPIs") introduced a memory
> leak of irqs on the "Don't bother with PPIs" return path. This issue
> was picked up by static analysis by cppcheck:
>
> [arch/arm/kernel/perf_event_cpu.c:315]: (error) Memory leak: irqs
>
> Instead, perform allocation of irqs after getting the irq hence
> removing need to clean up an allocation on the PPI affine return path.
>
> Fixes: 338d9dd3e2ae ("ARM: 8351/1: perf: don't warn about missing interrupt-affinity property for PPIs")

Will Deacon has similar patch[1] in Russell's patch tracker(8357/1)

Regards,
Sudeep

[1] 
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/342367.html
[2] http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=8357/1

WARNING: multiple messages have this Message-ID (diff)
From: Sudeep Holla <sudeep.holla@arm.com>
To: Colin King <colin.king@canonical.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Cc: Will Deacon <Will.Deacon@arm.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Russell King <linux@arm.linux.org.uk>,
	Sudeep Holla <sudeep.holla@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][V3] ARM: pmu: fix memory leak due to early return not freeing irqs
Date: Mon, 18 May 2015 14:27:06 +0100	[thread overview]
Message-ID: <5559E8AA.5080609@arm.com> (raw)
In-Reply-To: <1431953873-12283-1-git-send-email-colin.king@canonical.com>



On 18/05/15 13:57, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Recent commit 338d9dd3e2ae ("ARM: 8351/1: perf: don't warn about
> missing interrupt-affinity property for PPIs") introduced a memory
> leak of irqs on the "Don't bother with PPIs" return path. This issue
> was picked up by static analysis by cppcheck:
>
> [arch/arm/kernel/perf_event_cpu.c:315]: (error) Memory leak: irqs
>
> Instead, perform allocation of irqs after getting the irq hence
> removing need to clean up an allocation on the PPI affine return path.
>
> Fixes: 338d9dd3e2ae ("ARM: 8351/1: perf: don't warn about missing interrupt-affinity property for PPIs")

Will Deacon has similar patch[1] in Russell's patch tracker(8357/1)

Regards,
Sudeep

[1] 
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/342367.html
[2] http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=8357/1

  reply	other threads:[~2015-05-18 13:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 12:57 [PATCH][V3] ARM: pmu: fix memory leak due to early return not freeing irqs Colin King
2015-05-18 12:57 ` Colin King
2015-05-18 13:27 ` Sudeep Holla [this message]
2015-05-18 13:27   ` Sudeep Holla
2015-05-18 13:26   ` Colin Ian King
2015-05-18 13:26     ` Colin Ian King

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=5559E8AA.5080609@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.