diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-23 10:51:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-23 10:51:20 -0400 |
commit | d0b72a0817b0164986d35366c8ffe92fd985f713 (patch) | |
tree | 0fde19a1454d8e91e7350dea9192f3a42244c3a4 | |
parent | 2e11665c5ea436e2fc2cfecbfc6dbfb8d420af29 (diff) | |
parent | a94b1d1fd7ca3129e1d38d38167779fa6ee69780 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: 8-byte align return value from compat_alloc_user_space()
-rw-r--r-- | include/asm-sparc64/compat.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h index c73935dc7ba1..36511ca51416 100644 --- a/include/asm-sparc64/compat.h +++ b/include/asm-sparc64/compat.h | |||
@@ -164,7 +164,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr) | |||
164 | return (u32)(unsigned long)uptr; | 164 | return (u32)(unsigned long)uptr; |
165 | } | 165 | } |
166 | 166 | ||
167 | static __inline__ void __user *compat_alloc_user_space(long len) | 167 | static inline void __user *compat_alloc_user_space(long len) |
168 | { | 168 | { |
169 | struct pt_regs *regs = current_thread_info()->kregs; | 169 | struct pt_regs *regs = current_thread_info()->kregs; |
170 | unsigned long usp = regs->u_regs[UREG_I6]; | 170 | unsigned long usp = regs->u_regs[UREG_I6]; |
@@ -174,7 +174,10 @@ static __inline__ void __user *compat_alloc_user_space(long len) | |||
174 | else | 174 | else |
175 | usp &= 0xffffffffUL; | 175 | usp &= 0xffffffffUL; |
176 | 176 | ||
177 | return (void __user *) (usp - len); | 177 | usp -= len; |
178 | usp &= ~0x7UL; | ||
179 | |||
180 | return (void __user *) usp; | ||
178 | } | 181 | } |
179 | 182 | ||
180 | struct compat_ipc64_perm { | 183 | struct compat_ipc64_perm { |