From: Dmitry Baryshkov <dbaryshkov@gmail.com>
To: linux-omap@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [PATCH 0/0] Power domain and clock domain patches for omap
Date: Wed, 20 Aug 2008 08:20:55 +0000 (UTC) [thread overview]
Message-ID: <g8gk57$2ff$1@ger.gmane.org> (raw)
In-Reply-To: alpine.DEB.1.00.0808200034010.26647@utopia.booyaka.com
Paul Walmsley wrote:
> Hello Dmitry,
>
> On Tue, 19 Aug 2008, Dmitry Baryshkov wrote:
>
>> There is one major flaw IMO in this code. Please correct me if I'm
>> wrong: Driver A: powerdomain_register()
>> Driver B: powerdomain_get()
>> Driver A: powerdomain_unregister()
>>
>> Then Driver B has a reference to unregistered domain. And as
>> powerdomains lack any type of refcounting this can lead to any type of
>> memory access bugs if Driver A is unloaded from the kernel.
>
> At this point, only OMAP kernel init code registers powerdomains in
> arch/arm/mach-omap2/io.c. It's not intended that driver code will
> manipulate or even know about these.
Anyway, this type of powerdomain_unregister() is asking for problems. Either
unregistering should be disallowed, or proper reference counting should be
implemented IMO.
--
With best wishes
Dmitry
prev parent reply other threads:[~2008-08-20 8:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 15:19 [PATCH 0/0] Power domain and clock domain patches for omap Tony Lindgren
2008-07-16 15:19 ` [PATCH 01/10] ARM: OMAP2: Powerdomain: Add base OMAP2/3 powerdomain code Tony Lindgren
2008-07-16 15:19 ` [PATCH 02/10] ARM: OMAP2: Powerdomain: Add OMAP2/3 common powerdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 03/10] ARM: OMAP2: Powerdomain: Add OMAP2 powerdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 04/10] ARM: OMAP: Powerdomain: Add OMAP3 powerdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 05/10] ARM: OMAP2: Clockdomain: Add base OMAP2/3 clockdomain code Tony Lindgren
2008-07-16 15:19 ` [PATCH 06/10] ARM: OMAP2: Clockdomain: Connect clockdomain code to powerdomain code Tony Lindgren
2008-07-16 15:19 ` [PATCH 07/10] ARM: OMAP2: Clockdomain: Encode OMAP2/3 clockdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 08/10] ARM: OMAP2: Clockdomain: Associate clocks with clockdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 09/10] ARM: OMAP2: Clockdomain: Integrate OMAP3 clocks with clockdomain code Tony Lindgren
2008-07-16 15:19 ` [PATCH 10/10] ARM: OMAP2: Clock: Combine 34xx l3_icks and l4_icks Tony Lindgren
2008-07-21 22:29 ` [PATCH 0/0] Power domain and clock domain patches for omap Russell King - ARM Linux
2008-07-25 0:53 ` David Brownell
2008-08-18 16:34 ` Russell King - ARM Linux
2008-08-19 8:39 ` git-pull request for omap2-clock branch Tony Lindgren
2008-08-19 8:39 ` [PATCH 01/10] ARM: OMAP2: Powerdomain: Add base OMAP2/3 powerdomain code Tony Lindgren
2008-08-19 8:39 ` [PATCH 02/10] ARM: OMAP2: Powerdomain: Add OMAP2/3 common powerdomains Tony Lindgren
2008-08-19 8:39 ` [PATCH 03/10] ARM: OMAP2: Powerdomain: Add OMAP2 powerdomains Tony Lindgren
2008-08-19 8:39 ` [PATCH 04/10] ARM: OMAP: Powerdomain: Add OMAP3 powerdomains Tony Lindgren
2008-08-19 8:39 ` [PATCH 05/10] ARM: OMAP2: Clockdomain: Add base OMAP2/3 clockdomain code Tony Lindgren
2008-08-19 8:39 ` [PATCH 06/10] ARM: OMAP2: Clockdomain: Connect clockdomain code to powerdomain code Tony Lindgren
2008-08-19 8:39 ` [PATCH 07/10] ARM: OMAP2: Clockdomain: Encode OMAP2/3 clockdomains Tony Lindgren
2008-08-19 8:39 ` [PATCH 08/10] ARM: OMAP2: Clockdomain: Associate clocks with clockdomains Tony Lindgren
2008-08-19 8:40 ` [PATCH 09/10] ARM: OMAP2: Clockdomain: Integrate OMAP3 clocks with clockdomain code Tony Lindgren
2008-08-19 8:40 ` [PATCH 10/10] ARM: OMAP2: Clock: Combine 34xx l3_icks and l4_icks Tony Lindgren
2008-08-19 9:11 ` git-pull request for omap2-clock branch Russell King - ARM Linux
2008-08-19 21:46 ` [PATCH 0/0] Power domain and clock domain patches for omap Dmitry Baryshkov
2008-08-20 6:38 ` Paul Walmsley
2008-08-20 8:20 ` Dmitry Baryshkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='g8gk57$2ff$1@ger.gmane.org' \
--to=dbaryshkov@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox