patch-2.1.36 linux/include/linux/vmalloc.h

Next file: linux/include/linux/wireless.h
Previous file: linux/include/linux/sysctl.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.35/linux/include/linux/vmalloc.h linux/include/linux/vmalloc.h
@@ -20,14 +20,16 @@
 
 extern inline void set_pgdir(unsigned long address, pgd_t entry)
 {
-#ifndef __mc68000__
+#if !defined(__mc68000__) && !defined(__sparc_v9__)
 	struct task_struct * p;
 
+	read_lock(&tasklist_lock);
 	for_each_task(p) {
 		if (!p->mm)
 			continue;
 		*pgd_offset(p->mm,address) = entry;
 	}
+	read_unlock(&tasklist_lock);
 #endif
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov