Re: [PATCH 2/2] DSPBRIDGE: New reserved memory accounting framework

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

 



On Wed, Feb 17, 2010 at 4:05 AM, Guzman Lugo, Fernando <x0095840@xxxxxx> 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 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