Missing links in insert_vm_struct() 2.2.0-pre8

Project BRAVO (bravo@russell.ce.uniroma2.it)
Thu, 21 Jan 1999 15:31:23 +0100


In insert_vm_struct() [mm/mmap.c], two backward links seem to be not properly
updated. The following patch should correct the suspected bug.

Or is it a feature?!

Marco Cesati

+---------------------------------------------------------------+
| Computer Engineering - Project BRAVO |
+---------------------------------------------------------------+
| University of Rome "Tor Vergata" |
| Dept. of Computer Science, Systems and Industrial Engineering |
| via di Tor Vergata, 00133 Rome (Italy) |
| e-mail: bravo@russell.ce.uniroma2.it |
+---------------------------------------------------------------+

--- v2.2.0-pre8/linux/mm/mmap.c.orig Thu Jan 21 15:06:21 1999
+++ linux/mm/mmap.c Thu Jan 21 15:08:04 1999
@@ -764,8 +764,10 @@
if (*pprev != next)
printk("insert_vm_struct: tree inconsistent with list\n");
}
- vmp->vm_next = *pprev;
+ if ((vmp->vm_next = *pprev) != NULL)
+ (*pprev)->vm_pprev = &vmp->vm_next;
*pprev = vmp;
+ vmp->vm_pprev = pprev;

mm->map_count++;
if (mm->map_count >= AVL_MIN_MAP_COUNT && !mm->mmap_avl)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/