From 52b4d30a0c253853352f8332f29bfe27018e7307 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 8 Feb 2006 18:45:33 +0000 Subject: [PATCH] Branch b_release_1_4_6 Using mmap + lustre on a system running elan it was possible to race when cleaning up the mmap and dereference a freed pointer. Fix from Quadrics for the rhel-2.4.21 qsnet patch. b=9869 --- lustre/kernel_patches/patches/qsnet-rhel-2.4.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lustre/kernel_patches/patches/qsnet-rhel-2.4.patch b/lustre/kernel_patches/patches/qsnet-rhel-2.4.patch index 14f2b76..c0d43e8 100644 --- a/lustre/kernel_patches/patches/qsnet-rhel-2.4.patch +++ b/lustre/kernel_patches/patches/qsnet-rhel-2.4.patch @@ -93660,14 +93660,14 @@ Index: linux-2.4.21/mm/mmap.c #include #include #include -@@ -1459,6 +1460,7 @@ - mm->total_vm = 0; - mm->locked_vm = 0; - +@@ -1450,6 +1451,7 @@ + release_segments(mm); + + spin_lock(&mm->page_table_lock); + coproc_release(mm); - flush_cache_mm(mm); - while (mpnt) { - struct vm_area_struct * next = mpnt->vm_next; + mpnt = mm->mmap; + mm->mmap = mm->mmap_cache = NULL; + mm->mm_rb = RB_ROOT; Index: linux-2.4.21/mm/mprotect.c =================================================================== --- linux-2.4.21.orig/mm/mprotect.c 2005-06-01 22:51:50.000000000 -0400 -- 1.8.3.1