diff options
author | 2006-07-03 00:25:15 -0700 | |
---|---|---|
committer | 2006-07-03 15:27:08 -0700 | |
commit | ad33945175bed649ca5fe0881269db005bbb449a (patch) | |
tree | 2aac47ea54ac59f33e8188e25e1e9d9807eecae7 /kernel | |
parent | [PATCH] lockdep: annotate ieee1394 skb-queue-head locking (diff) | |
download | linux-ad33945175bed649ca5fe0881269db005bbb449a.tar.gz linux-ad33945175bed649ca5fe0881269db005bbb449a.tar.bz2 linux-ad33945175bed649ca5fe0881269db005bbb449a.zip |
[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 7f48abdd7bb6..54953d8a6f17 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; |