summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/kstack.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-20 13:53:16 -0800
committerDavid S. Miller <davem@davemloft.net>2010-02-20 13:53:16 -0800
commit198d2f63a6096fe575b696b13ba61b62c620266f (patch)
treed0c2b0697370cc670029cd1eb2a80c35c71eac60 /arch/sparc/kernel/kstack.h
parent0da2b300b91ddeb9944c3fb4faaf78c1c482c0af (diff)
parent1f474646fdc36b457606bbcd6a3592e6cbd31ac4 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Diffstat (limited to 'arch/sparc/kernel/kstack.h')
-rw-r--r--arch/sparc/kernel/kstack.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sparc/kernel/kstack.h b/arch/sparc/kernel/kstack.h
index 4248d969272..5247283d1c0 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;