diff options
author | Andrew Morton <akpm@osdl.org> | 2006-06-23 11:05:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 16:43:03 +0200 |
commit | 0ae26f1b3159f3acb21ae1e866c3c7e16edd450f (patch) | |
tree | 28a86cc8682ad5b247f597773572e410b9457d72 /kernel/fork.c | |
parent | [PATCH] Remove CONFIG_PARPORT_ARC, drivers/parport/parport_arc.c (diff) | |
download | linux-0ae26f1b3159f3acb21ae1e866c3c7e16edd450f.tar.xz linux-0ae26f1b3159f3acb21ae1e866c3c7e16edd450f.zip |
[PATCH] mmput() might sleep
exit_aio() and exit_mmap() can sleep. But it's easy to accidentally call
mmput() from inside locks.
Cc: Dave Peterson <dsp@llnl.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index ac8100e3088a..195958a3a4d6 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -368,6 +368,8 @@ void fastcall __mmdrop(struct mm_struct *mm) */ void mmput(struct mm_struct *mm) { + might_sleep(); + if (atomic_dec_and_test(&mm->mm_users)) { exit_aio(mm); exit_mmap(mm); |