From: Greg Kroah-Hartman Subject: Linux 2.6.27.5 Upstream 2.6.27.5 release from kernel.org Signed-off-by: Greg Kroah-Hartman Automatically created from "patches.kernel.org/patch-2.6.27.4-5" by xen-port-patches.py Index: head-2008-11-25/arch/x86/kernel/process_64-xen.c =================================================================== --- head-2008-11-25.orig/arch/x86/kernel/process_64-xen.c 2008-11-25 13:34:32.000000000 +0100 +++ head-2008-11-25/arch/x86/kernel/process_64-xen.c 2008-11-10 12:12:28.000000000 +0100 @@ -786,12 +786,12 @@ unsigned long get_wchan(struct task_stru if (!p || p == current || p->state==TASK_RUNNING) return 0; stack = (unsigned long)task_stack_page(p); - if (p->thread.sp < stack || p->thread.sp > stack+THREAD_SIZE) + if (p->thread.sp < stack || p->thread.sp >= stack+THREAD_SIZE) return 0; fp = *(u64 *)(p->thread.sp); do { if (fp < (unsigned long)stack || - fp > (unsigned long)stack+THREAD_SIZE) + fp >= (unsigned long)stack+THREAD_SIZE) return 0; ip = *(u64 *)(fp+8); if (!in_sched_functions(ip)) Index: head-2008-11-25/arch/x86/mm/pat-xen.c =================================================================== --- head-2008-11-25.orig/arch/x86/mm/pat-xen.c 2008-11-27 09:35:47.000000000 +0100 +++ head-2008-11-25/arch/x86/mm/pat-xen.c 2008-11-27 09:36:36.000000000 +0100 @@ -415,12 +415,16 @@ static inline int range_is_allowed(unsig return 1; } #else +/* This check is needed to avoid cache aliasing when PAT is enabled */ static inline int range_is_allowed(unsigned long mfn, unsigned long size) { u64 from = ((u64)mfn) << PAGE_SHIFT; u64 to = from + size; u64 cursor = from; + if (!pat_enabled) + return 1; + while (cursor < to) { if (!devmem_is_allowed(mfn)) { printk(KERN_INFO