Johannes Weiner dcd4a049b9 mm: check for no mmaps in exit_mmap()
When dup_mmap() ooms we can end up with mm->mmap == NULL.  The error
path does mmput() and unmap_vmas() gets a NULL vma which it
dereferences.

In exit_mmap() there is nothing to do at all for this case, we can
cancel the callpath right there.

[akpm@linux-foundation.org: add sorely-needed comment]
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reported-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:10 -08:00
..
2008-12-29 11:27:46 +02:00
2009-01-06 15:59:09 -08:00
2009-01-06 15:59:06 -08:00
2008-10-20 08:50:26 -07:00
2009-01-06 15:59:08 -08:00
2008-11-14 11:29:12 +11:00
2009-01-06 15:59:02 -08:00
2008-04-28 08:58:18 -07:00
2009-01-06 15:59:10 -08:00
2008-07-28 16:30:21 -07:00
2009-01-05 17:44:42 -08:00
2009-01-05 11:54:28 -05:00
2009-01-05 11:54:28 -05:00
2008-06-12 18:05:41 -07:00
2009-01-01 10:12:29 +10:30
2009-01-06 15:59:08 -08:00
2009-01-01 10:12:29 +10:30
2009-01-01 10:12:29 +10:30
2008-11-30 10:03:35 -08:00
2009-01-06 15:59:10 -08:00
2009-01-01 10:12:29 +10:30