开发者

VMA Operation Question

开发者 https://www.devze.com 2023-03-16 02:32 出处:网络
Does anyone know when the close function pointer of the struct vm_operations_struct (linux/mm.h) is called? Is it when munmap is called for the specified region?

Does anyone know when the close function pointer of the struct vm_operations_struct (linux/mm.h) is called? Is it when munmap is called for the specified region?

If so is th开发者_运维技巧is synchronous, meaning that the close should have been called after returning from munmap?


If I remember correctly it is in the munmap, It is not necessarily synchronous but it does require some locks/semaphores for the critical sections so that get_user_pages and access cannot read from an munmap'ed area incorrectly. If by synchronous you mean that the close happens in the munmap (by which you mean serially) then yes the vma area is removed from the linked list and then handed back to the kernel for allocating for other processes (the physical addresses).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号