On Wed, Feb 17, 2010 at 4:05 AM, Guzman Lugo, Fernando <x0095...@ti.com> wrote:
>>>  struct DSPHEAP_RES_OBJECT {
>>>        s32            heapAllocated; /* DMM status */
>>> @@ -141,6 +150,10 @@ struct PROCESS_CONTEXT{
>>>        /* DMM mapped memory resources */
>>>        struct DMM_MAP_OBJECT *dmm_map_list;
>>>
>>> +       /* DMM reserved memory resources */
>>> +       struct list_head dmm_rsv_list;
>>> +       spinlock_t dmm_rsv_list_lock;
>>> +
>>
>>Why rsv requires a spinlock, but not map?
>>
>>I guess it would be needed if somehow PROC_UnReserveMemory() was
>>called by user-space at the same time than bridge_close, but is that
>>really possible? If it is, then the same danger is present with
>>PROC_UnMap() unless I'm missing something.
>
> No, that's not possible. However protection is still needed for PROC_ 
> ReserveMemory/UnReserveMemory and also for PROC_Map/UnMap.

Ok, then I guess it would make sense to have a patch for
DMM_RSV_OBJECT, and another one to add the protection to both
PROC_Map/UnMap/Reserve/UnReserve().

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

Reply via email to