diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-19 19:34:40 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-19 19:34:40 -0800 |
commit | 83bdd240eeb388a611b2bdbed9afdb3192966cec (patch) | |
tree | c899d47c6e929b314007d17d249d0b4b068fa745 /arch/sparc/kernel/kstack.h | |
parent | 65d76fc4b3161ee1e7034a6f764d1151eb51a555 (diff) | |
parent | 1f474646fdc36b457606bbcd6a3592e6cbd31ac4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Fix sun4u execute bit check in TSB I-TLB load.
sparc: Fix incorrect comparison in of_bus_ambapp_match()
sparc64: Sync of_create_pci_dev() with drivers/pci/probe.c changes.
sparc64: Tighten checks in kstack_valid().
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 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; |