diff options
-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) | |||
11 | { | 11 | { |
12 | unsigned long base = (unsigned long) tp; | 12 | unsigned long base = (unsigned long) tp; |
13 | 13 | ||
14 | /* Stack pointer must be 16-byte aligned. */ | ||
15 | if (sp & (16UL - 1)) | ||
16 | return false; | ||
17 | |||
14 | if (sp >= (base + sizeof(struct thread_info)) && | 18 | if (sp >= (base + sizeof(struct thread_info)) && |
15 | sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf))) | 19 | sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf))) |
16 | return true; | 20 | return true; |