Re: remap_page_range & mm semaphore

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

 



On Mon, Mar 01, 2004 at 08:51:25PM +0100, Frank A. Uepping wrote:
> Hello,
> above the implementation of the function remap_page_range() is this comment:
> 	"Note: this is only safe if the mm semaphore is held when called."
> Is this obsolete, because I can't find such mm semaphore?
>

If you look at mm_struct you find that there's no only page table spinlock but 
also a R/W sem.
This function like others of the same family requires that this sem was already hold.

struct mm_struct {
	.......
	.......
	struct rw_semaphore mmap_sem;
	spinlock_t page_table_lock;
	.......
};

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux