From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf
Date: Fri, 22 Sep 2017 11:54:06 +0100 [thread overview]
Message-ID: <20170922105405.GD23365@arm.com> (raw)
In-Reply-To: <f3b19a8ba9ca69fe84b0d980b6337a33a1da907d.1505884534.git.arvind.yadav.cs@gmail.com>
On Wed, Sep 20, 2017 at 12:26:38PM +0530, Arvind Yadav wrote:
> Free memory region, if arm_pmu_acpi_probe is not successful.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/perf/arm_pmu_acpi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
> index 0a9b787..3303dd8 100644
> --- a/drivers/perf/arm_pmu_acpi.c
> +++ b/drivers/perf/arm_pmu_acpi.c
> @@ -235,6 +235,7 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn)
> ret = armpmu_register(pmu);
> if (ret) {
> pr_warn("Failed to register PMU for CPU%d\n", cpu);
> + kfree(pmu->name);
> return ret;
> }
> }
It's a bit weird that we bail out of the loop on the first failing CPU, but
you've not changed that behaviour so your patch looks fine in isolation:
Acked-by: Will Deacon <will.deacon@arm.com>
Catalin: can you pick this up as a fix, please?
Will
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>, catalin.marinas@arm.com
Cc: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf
Date: Fri, 22 Sep 2017 11:54:06 +0100 [thread overview]
Message-ID: <20170922105405.GD23365@arm.com> (raw)
In-Reply-To: <f3b19a8ba9ca69fe84b0d980b6337a33a1da907d.1505884534.git.arvind.yadav.cs@gmail.com>
On Wed, Sep 20, 2017 at 12:26:38PM +0530, Arvind Yadav wrote:
> Free memory region, if arm_pmu_acpi_probe is not successful.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/perf/arm_pmu_acpi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
> index 0a9b787..3303dd8 100644
> --- a/drivers/perf/arm_pmu_acpi.c
> +++ b/drivers/perf/arm_pmu_acpi.c
> @@ -235,6 +235,7 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn)
> ret = armpmu_register(pmu);
> if (ret) {
> pr_warn("Failed to register PMU for CPU%d\n", cpu);
> + kfree(pmu->name);
> return ret;
> }
> }
It's a bit weird that we bail out of the loop on the first failing CPU, but
you've not changed that behaviour so your patch looks fine in isolation:
Acked-by: Will Deacon <will.deacon@arm.com>
Catalin: can you pick this up as a fix, please?
Will
next prev parent reply other threads:[~2017-09-22 10:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 6:56 [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf Arvind Yadav
2017-09-20 6:56 ` Arvind Yadav
2017-09-22 10:54 ` Will Deacon [this message]
2017-09-22 10:54 ` Will Deacon
2017-09-22 14:12 ` Catalin Marinas
2017-09-22 14:12 ` Catalin Marinas
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=20170922105405.GD23365@arm.com \
--to=will.deacon@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.