[lkml]   [2001]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Deadlock on the mm->mmap_sem
On Thu, Sep 20, 2001 at 09:01:13AM +0100, David Howells wrote:
> Andrea Arcangeli <> wrote:
> > the process doesn't need to lock multiple mm_structs at the same time.
> fork, ptrace, /proc/pid/mem, /proc/pid/maps
> All have to be able to lock two process's mm_structs simultaneously, even if
> it's indirectly through copy_to_user() or copy_from_user().

ptrace doesn't use down_read_recursive, nor /proc/<>/mem, nor fork.

for /proc/<pid>/maps this check takes care of it of course (or it could
get unfair again: only when we're faulting on our vm we're allowed to go

if (task == current)
down_read_recursive(&mm->mmap_sem, &current->mm_recursor);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:03    [W:0.045 / U:1.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site