]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arch/tile: avoid false corrupt frame warning in early boot
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 29 Mar 2012 18:02:52 +0000 (14:02 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Fri, 30 Mar 2012 22:55:34 +0000 (18:55 -0400)
With lockstat we can end up trying to get a backtrace before
"high_memory" is initialized, so don't worry about range testing
if it is zero.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/kernel/process.c

index 4c1ac6e5347ac687bdbb4de54be8a736485d9416..3be7eb5eee478afd572692407a874d084f0aa300 100644 (file)
@@ -286,7 +286,7 @@ struct task_struct *validate_current(void)
        static struct task_struct corrupt = { .comm = "<corrupt>" };
        struct task_struct *tsk = current;
        if (unlikely((unsigned long)tsk < PAGE_OFFSET ||
-                    (void *)tsk > high_memory ||
+                    (high_memory && (void *)tsk > high_memory) ||
                     ((unsigned long)tsk & (__alignof__(*tsk) - 1)) != 0)) {
                pr_err("Corrupt 'current' %p (sp %#lx)\n", tsk, stack_pointer);
                tsk = &corrupt;