lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170922105405.GD23365@arm.com>
Date:   Fri, 22 Sep 2017 11:54:06 +0100
From:   Will Deacon <will.deacon@....com>
To:     Arvind Yadav <arvind.yadav.cs@...il.com>, catalin.marinas@....com
Cc:     mark.rutland@....com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by
 kasprintf

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@...il.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@....com>

Catalin: can you pick this up as a fix, please?

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ