From: Johannes Weiner Date: Tue, 6 Jan 2009 22:40:31 +0000 (-0800) Subject: mm: check for no mmaps in exit_mmap() X-Git-Tag: v2.6.27.22~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=664b8ee764c295ff3bfd9736094a036dcc0ebda2;p=pandora-kernel.git mm: check for no mmaps in exit_mmap() commit dcd4a049b9751828c516c59709f3fdf50436df85 upstream. 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 Reported-by: Akinobu Mita Cc: Nick Piggin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Reported-by: Kir Kolyshkin Tested-by: Kir Kolyshkin Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed