Re: [PATCH 0/0] Power domain and clock domain patches for omap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux