* What locks are needed to safely use vma->vm_file ?
@ 2010-05-11 4:56 Jose Luis Marchetti
0 siblings, 0 replies; only message in thread
From: Jose Luis Marchetti @ 2010-05-11 4:56 UTC (permalink / raw)
To: linux-kernel
Hi,
It appears that doing down_read(&mm->mmap_sem) is enough to safely use vma->vm_file, is it correct ?
Also in the lock subject, to get to all vm_files in the system, is the following correct or something is missing ?
read_lock(&tasklist_lock);
for_each_process(p)
{
mm = get_task_mm(p);
down_read(&mm->mmap_sem);
// ... Here what I need to do with this mm vm_file objects
up_read(&mm->mmap_sem);
mmput(mm);
}
read_unlock(&tasklist_lock);
Thanks in advance for your answer
José Luís Marchetti
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-11 4:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-11 4:56 What locks are needed to safely use vma->vm_file ? Jose Luis Marchetti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®