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]
Date:	Mon, 8 Sep 2014 17:13:41 +0300
From:	Laurentiu Tudor <b10716@...escale.com>
To:	Grant Likely <grant.likely@...aro.org>,
	<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>
CC:	Laurentiu Tudor <Laurentiu.Tudor@...escale.com>
Subject: Re: [PATCH] of: make sure of_alias is initialized before accessing
 it

On 09/08/2014 04:29 PM, Grant Likely wrote:
> On Wed, 27 Aug 2014 17:09:39 +0300, Laurentiu Tudor <b10716@...escale.com> wrote:
>> Simply swap of_alias and of_chosen initialization so
>> that of_alias ends up read first. This must be done
>> because it is accessed couple of lines below when
>> trying to initialize the of_stdout using the alias
>> based legacy method.
>>
>> [Fixes a752ee5 - tty: Update hypervisor tty drivers to                          
>> use core stdout parsing code]
>>
>> Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@...escale.com>
>> Cc: Grant Likely <grant.likely@...aro.org>
>> ---
>>  drivers/of/base.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/of/base.c b/drivers/of/base.c
>> index d8574ad..52f8506 100644
>> --- a/drivers/of/base.c
>> +++ b/drivers/of/base.c
>> @@ -1847,6 +1847,10 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
>>  {
>>  	struct property *pp;
>>  
>> +	of_aliases = of_find_node_by_path("/aliases");
>> +	if (!of_aliases)
>> +		return;
>> +
>>  	of_chosen = of_find_node_by_path("/chosen");
>>  	if (of_chosen == NULL)
>>  		of_chosen = of_find_node_by_path("/chosen@0");
>> @@ -1862,10 +1866,6 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
>>  			of_stdout = of_find_node_by_path(name);
>>  	}
>>  
>> -	of_aliases = of_find_node_by_path("/aliases");
>> -	if (!of_aliases)
>> -		return;
>> -
> 
> Close, but not quite. The 'if (!of_aliases)' test should not be moved.
> Only the search for of_find_node_by_path().

Eek, completely missed this. Sorry.

> I've fixed it up and applied.
 
Thanks!

---
Best Regards, Laurentiu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ