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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <43662bfd-2f3d-5264-c9c2-5187f573a924@quicinc.com>
Date:   Tue, 8 Nov 2022 15:01:52 +0530
From:   Sibi Sankar <quic_sibis@...cinc.com>
To:     Chen Hui <judy.chenhui@...wei.com>, <agross@...nel.org>,
        <andersson@...nel.org>, <konrad.dybcio@...ainline.org>,
        <rafael@...nel.org>, <viresh.kumar@...aro.org>,
        <sibis@...eaurora.org>, <mka@...omium.org>
CC:     <linux-arm-msm@...r.kernel.org>, <linux-pm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cpufreq: qcom-hw: Fix memory leak in
 qcom_cpufreq_hw_read_lut()

Hey Chen,

Thanks for the patch.

On 11/8/22 12:53, Chen Hui wrote:
> If "cpu_dev" fails to get opp table in qcom_cpufreq_hw_read_lut(),
> the program will return, resulting in "table" resource is not released.
> 
> Fixes: 51c843cf77bb ("cpufreq: qcom: Update the bandwidth levels on frequency change")

Reviewed-by: Sibi Sankar <quic_sibis@...cinc.com>

> Signed-off-by: Chen Hui <judy.chenhui@...wei.com>
> ---
>   drivers/cpufreq/qcom-cpufreq-hw.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index 833589bc95e4..d15097549e8c 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -193,6 +193,7 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
>   		}
>   	} else if (ret != -ENODEV) {
>   		dev_err(cpu_dev, "Invalid opp table in device tree\n");
> +		kfree(table);
>   		return ret;
>   	} else {
>   		policy->fast_switch_possible = true;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ