diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-26 14:41:00 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-26 14:41:00 +1100 |
commit | 874f2f997dbe041a6c6e509dae8656ed9022d65d (patch) | |
tree | 61898165882041ef7f9beaf2ef6663a1a4d3c29a /arch/sparc/kernel/kstack.h | |
parent | 071c06cb570d38efe23a124e885f2f3e643a9206 (diff) | |
parent | 6ebdc661b608671e9ca572af8bb42d58108cc008 (diff) | |
download | talos-obmc-linux-874f2f997dbe041a6c6e509dae8656ed9022d65d.tar.gz talos-obmc-linux-874f2f997dbe041a6c6e509dae8656ed9022d65d.zip |
Merge commit 'origin/master' into next
Manual merge of:
drivers/char/hvc_console.c
drivers/char/hvc_console.h
Diffstat (limited to 'arch/sparc/kernel/kstack.h')
-rw-r--r-- | arch/sparc/kernel/kstack.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sparc/kernel/kstack.h b/arch/sparc/kernel/kstack.h index 4248d969272f..5247283d1c03 100644 --- a/arch/sparc/kernel/kstack.h +++ b/arch/sparc/kernel/kstack.h @@ -11,6 +11,10 @@ static inline bool kstack_valid(struct thread_info *tp, unsigned long sp) { unsigned long base = (unsigned long) tp; + /* Stack pointer must be 16-byte aligned. */ + if (sp & (16UL - 1)) + return false; + if (sp >= (base + sizeof(struct thread_info)) && sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf))) return true; |