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: <d06ab953-0a35-fd3d-58ea-8d875738dfd7@wanadoo.fr>
Date:   Sat, 13 May 2017 18:44:46 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     wharms@....de
Cc:     nsekhar@...com, khilman@...nel.org, linux@...linux.org.uk,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in
 normal path in 'davinci_pm_init'

Le 13/05/2017 à 15:22, walter harms a écrit :
>
> Am 13.05.2017 13:40, schrieb Christophe JAILLET:
>> This looks spurious to iounmap resources in the normal path of this init
>> function.
>> The 3 ioremap'ed fields of 'pm_config' can be accessed later on in other
>> functions, so it is likely that we should return 'success' before unrolling
>> everything.
>>
>> Fixes: aa9aa1ec2df6 ("ARM: davinci: PM: rework init, remove platform device")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>> ---
>> This patch is just a *guess*. The end of the function looks more like a
>> error handling code rather than a normal path.
>> ---
>>   arch/arm/mach-davinci/pm.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c
>> index d282b0783ecf..163d865abbf9 100644
>> --- a/arch/arm/mach-davinci/pm.c
>> +++ b/arch/arm/mach-davinci/pm.c
>> @@ -161,6 +161,7 @@ int __init davinci_pm_init(void)
>>   						davinci_cpu_suspend_sz);
>>   
>>   	suspend_set_ops(&davinci_pm_ops);
>> +	return 0;
>>   
>>   no_sram_mem:
>>   	iounmap(pm_config.ddrpsc_reg_base);
>
> looks like, but that would mean that is wrong also:
>
> 	davinci_sram_suspend = sram_alloc(davinci_cpu_suspend_sz, NULL);
> 	if (!davinci_sram_suspend) {
> 		pr_err("PM: cannot allocate SRAM memory\n");
> 		return -ENOMEM;
> 	}
>
> what means 1 iounmap missing.
>
> re,
>   wh
>
This is what I try to fix in the [1/2] patch.

CJ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ