diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-07-03 00:25:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-03 15:27:08 -0700 |
commit | ad33945175bed649ca5fe0881269db005bbb449a (patch) | |
tree | 2aac47ea54ac59f33e8188e25e1e9d9807eecae7 /kernel | |
parent | d378834840907326ac9d448056d957d13cc3718f (diff) | |
download | op-kernel-dev-ad33945175bed649ca5fe0881269db005bbb449a.zip op-kernel-dev-ad33945175bed649ca5fe0881269db005bbb449a.tar.gz |
[PATCH] lockdep: annotate ->mmap_sem
Teach special (recursive) locking code to the lock validator. Has no effect
on non-lockdep kernels.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 7f48abd..54953d8 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -193,7 +193,10 @@ static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) down_write(&oldmm->mmap_sem); flush_cache_mm(oldmm); - down_write(&mm->mmap_sem); + /* + * Not linked in yet - no deadlock potential: + */ + down_write_nested(&mm->mmap_sem, SINGLE_DEPTH_NESTING); mm->locked_vm = 0; mm->mmap = NULL; |