summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch')
-rw-r--r--sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch
new file mode 100644
index 000000000000..451489ad424e
--- /dev/null
+++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.2.1-check-for-no-mmaps.patch
@@ -0,0 +1,29 @@
+From: Cyrill Gorcunov <gorcunov@openvz.org>
+Date: Thu, 23 Apr 2009 09:47:54 +0000 (+0400)
+Subject: mm: check for no mmaps in exit_mmap()
+X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=acfd6c89981b9de80b96741380780ffe6c87a15d
+
+mm: check for no mmaps in exit_mmap()
+
+Backported commit dcd4a049 from the mainstream.
+
+http://bugzilla.openvz.org/show_bug.cgi?id=1230
+
+Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
+Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
+---
+
+diff --git a/mm/mmap.c b/mm/mmap.c
+index 564186a..2679a9c 100644
+--- a/mm/mmap.c
++++ b/mm/mmap.c
+@@ -2133,6 +2133,9 @@ void exit_mmap(struct mm_struct *mm)
+ arch_exit_mmap(mm);
+ mmu_notifier_release(mm);
+
++ if (!vma) /* Can happen if dup_mmap() received an OOM */
++ return;
++
+ lru_add_drain();
+ flush_cache_mm(mm);
+ tlb = tlb_gather_mmu(mm, 1);