[patch] bugfix for kdb

Tigran Aivazian tigran at veritas.com
Thu Aug 17 12:14:30 PDT 2000


hi,

Rather obvious bugfix. Against kdb v1.3.

Regards,
Tigran

--- vmalloc.c.0	Thu Aug 17 20:12:20 2000
+++ vmalloc.c	Thu Aug 17 20:12:40 2000
@@ -39,6 +39,7 @@
 {
 	struct vm_struct *vp;
 
+	read_lock(&vmlist_lock);
 	for(vp=vmlist; vp; vp = vp->next) {
 		unsigned long end = (unsigned long)vp->addr + vp->size;
 
@@ -47,9 +48,11 @@
 		if ((starta >= (unsigned long)vp->addr)
 		 && (starta < end)
 		 && (enda < end)) {
+			read_unlock(&vmlist_lock);
 			return 1;
 		}
 	}
+	read_unlock(&vmlist_lock);
 	return 0;
 }
 #endif




More information about the kdb mailing list