[patch] ia64: Don't forget to initialize PKStk for kernel-threads

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2005-01-19 15:56:40
Kernel-threads had both pUStk and pKStk set to FALSE, which was
unintentional.  I don't think the bug has shown any ill effects, but
it's clearly wrong and could come around to bite us later, so let's
fix it now.  Depends on the previous patch to clean up C usage of the
global/root-function predicates.

	--david

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/18 20:51:20-08:00 davidm@tiger.hpl.hp.com 
#   ia64: Don't forget to initialize pKStk on kernel-threads to TRUE.
# 
# arch/ia64/kernel/process.c
#   2005/01/18 20:51:03-08:00 davidm@tiger.hpl.hp.com +3 -1
#   Include "entry.h".
#   (convert_to_non_syscall): Initialize pKStk to TRUE.
# 
diff -Nru a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
--- a/arch/ia64/kernel/process.c	2005-01-18 20:54:31 -08:00
+++ b/arch/ia64/kernel/process.c	2005-01-18 20:54:31 -08:00
@@ -40,6 +40,8 @@
 #include <asm/unwind.h>
 #include <asm/user.h>
 
+#include "entry.h"
+
 #ifdef CONFIG_PERFMON
 # include <asm/perfmon.h>
 #endif
@@ -667,7 +669,7 @@
 	regs.pt.cr_ifs = 1UL << 63;		/* mark as valid, empty frame */
 	regs.sw.ar_fpsr = regs.pt.ar_fpsr = ia64_getreg(_IA64_REG_AR_FPSR);
 	regs.sw.ar_bspstore = (unsigned long) current + IA64_RBS_OFFSET;
-
+	regs.sw.pr = (1 << PRED_KERNEL_STACK);
 	return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs.pt, 0, NULL, NULL);
 }
 EXPORT_SYMBOL(kernel_thread);
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Jan 18 23:58:38 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:34 EST