Commit 0ae26f1b3159f3acb21ae1e866c3c7e16edd450f

Authored by Andrew Morton
Committed by Linus Torvalds
1 parent 32797f976d

[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>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -368,6 +368,8 @@
368 368 */
369 369 void mmput(struct mm_struct *mm)
370 370 {
  371 + might_sleep();
  372 +
371 373 if (atomic_dec_and_test(&mm->mm_users)) {
372 374 exit_aio(mm);
373 375 exit_mmap(mm);