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] [day] [month] [year] [list]
Date:	Wed, 10 Mar 2010 09:27:37 -0800
From:	Kevin Hilman <khilman@...prootsystems.com>
To:	Mike Chan <mike@...roid.com>
Cc:	android-kernel@...glegroups.com,
	Chunqiu Wang <cqwang@...orola.com>,
	Tony Lindgren <tony@...mide.com>,
	Russell King <linux@....linux.org.uk>,
	Rajendra Nayak <rnayak@...com>,
	Tero Kristo <tero.kristo@...ia.com>,
	Kalle Jokiniemi <ext-kalle.jokiniemi@...ia.com>,
	Jouni Hogander <jouni.hogander@...ia.com>,
	linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] omap: resource: Add per-resource mutex for OMAP resource  framework

Mike Chan <mike@...roid.com> writes:

> On Tue, Mar 9, 2010 at 4:09 PM,  <y@...gle.com> wrote:
>> From: Chunqiu Wang <cqwang@...orola.com>
>>
>> Current OMAP resource fwk uses a global res_mutex
>> for resource_request and resource_release calls
>> for all the available resources.It may cause dead
>> lock if resource_request/resource_release is called
>> recursively.
>>
>> For current OMAP3 VDD1/VDD2 resource, the change_level
>> implementation is mach-omap2/resource34xx.c/set_opp(),
>> when using resource_release to remove vdd1 constraint,
>> this function may call resource_release again to release
>> Vdd2 constrait if target vdd1 level is less than OPP3.
>> in this scenario, the global res_mutex down operation
>> will be called again, this will cause the second
>> down operation hang there.
>>
>> To fix the problem, per-resource mutex is added
>> to avoid hangup when resource_request/resource_release
>> is called recursively.
>>
>> Signed-off-by: Chunqiu Wang <cqwang@...orola.com>
>> Signed-off-by: Mike Chan <mike@...roid.com>
>> ---
>>  arch/arm/plat-omap/include/plat/resource.h |    2 ++
>>  arch/arm/plat-omap/resource.c              |   21 ++++++++++-----------
>>  2 files changed, 12 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/include/plat/resource.h b/arch/arm/plat-omap/include/plat/resource.h
>> index 9acebcc..b5aff1f 100644
>> --- a/arch/arm/plat-omap/include/plat/resource.h
>> +++ b/arch/arm/plat-omap/include/plat/resource.h
>> @@ -54,6 +54,8 @@ struct shared_resource {
>>        /* Shared resource operations */
>>        struct shared_resource_ops *ops;

[...]

>
> Oops, my git client was slightly screwed up, apologies, I meant to
> send this from mike@...roid.com, the patch is still good though :)
>

FYI... SRF is currently only in the PM branch of the OMAP tree, is
deprecated and is not targeted for mainline.  

I'll merge this there, but please note that there is no new
development happening for SRF.

Thanks,

Kevin

--
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