patch-2.1.23 linux/arch/sparc/kernel/windows.c

Next file: linux/arch/sparc/kernel/wof.S
Previous file: linux/arch/sparc/kernel/unaligned.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.22/linux/arch/sparc/kernel/windows.c linux/arch/sparc/kernel/windows.c
@@ -8,6 +8,8 @@
 #include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/mm.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
 
 #include <asm/uaccess.h>
 
@@ -111,6 +113,7 @@
 	struct thread_struct *tp;
 	int window;
 
+	lock_kernel();
 	flush_user_windows();
 	tp = &current->tss;
 	for(window = 0; window < tp->w_saved; window++) {
@@ -121,4 +124,5 @@
 			do_exit(SIGILL);
 	}
 	tp->w_saved = 0;
+	unlock_kernel();
 }

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