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] [day] [month] [year] [list]
Message-ID: <455e76f8-43c5-2976-e10b-a0fffeaee25f@arm.com>
Date:   Tue, 3 Aug 2021 09:49:18 +0100
From:   Lukasz Luba <lukasz.luba@....com>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     linux-kernel@...r.kernel.org, sudeep.holla@....com,
        cristian.marussi@....com, rjw@...ysocki.net,
        nicola.mazzucato@....com, linux-arm-kernel@...ts.infradead.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH] cpufreq: arm_scmi: Fix error path when allocation failed

Hi Viresh,

On 8/3/21 5:34 AM, Viresh Kumar wrote:
> On 02-08-21, 21:45, Lukasz Luba wrote:
>> Print warning and return an error which would stop the initialization
>> when cpumask allocation failed.
>>
>> Fixes: 80a064dbd556 ("scmi-cpufreq: Get opp_shared_cpus from opp-v2 for EM")
>> Signed-off-by: Lukasz Luba <lukasz.luba@....com>
>> ---
>>   drivers/cpufreq/scmi-cpufreq.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
>> index ec9a87ca2dbb..b159123e68fd 100644
>> --- a/drivers/cpufreq/scmi-cpufreq.c
>> +++ b/drivers/cpufreq/scmi-cpufreq.c
>> @@ -133,8 +133,10 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
>>   		return -ENODEV;
>>   	}
>>   
>> -	if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL))
>> -		ret = -ENOMEM;
>> +	if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL)) {
>> +		dev_warn(cpu_dev, "failed to allocate cpumask\n");
> 
> We shouldn't be printing here anything I believe as the allocation
> core does it for us. That's why you won't see a print message anywhere
> for failed allocations.

Thanks for the comment. Let me send the v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ