Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: 8-byte align return value from compat_alloc_user_space()
  • Loading branch information
Linus Torvalds committed Oct 23, 2006
2 parents 2e11665 + a94b1d1 commit d0b72a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/asm-sparc64/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)
return (u32)(unsigned long)uptr;
}

static __inline__ void __user *compat_alloc_user_space(long len)
static inline void __user *compat_alloc_user_space(long len)
{
struct pt_regs *regs = current_thread_info()->kregs;
unsigned long usp = regs->u_regs[UREG_I6];
Expand All @@ -174,7 +174,10 @@ static __inline__ void __user *compat_alloc_user_space(long len)
else
usp &= 0xffffffffUL;

return (void __user *) (usp - len);
usp -= len;
usp &= ~0x7UL;

return (void __user *) usp;
}

struct compat_ipc64_perm {
Expand Down

0 comments on commit d0b72a0

Please sign in to comment.