Commit 546b37a5 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: gcc 3.5 fixes #2

Here are the ppc64 specific gcc 3.5 fixes.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ff25ea7d
...@@ -172,8 +172,6 @@ struct OpenPIC { ...@@ -172,8 +172,6 @@ struct OpenPIC {
OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS]; OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
}; };
extern volatile struct OpenPIC *OpenPIC;
/* /*
* Current Task Priority Register * Current Task Priority Register
......
...@@ -298,12 +298,15 @@ long sys32_sigaction(int sig, struct old_sigaction32 __user *act, ...@@ -298,12 +298,15 @@ long sys32_sigaction(int sig, struct old_sigaction32 __user *act,
if (act) { if (act) {
compat_old_sigset_t mask; compat_old_sigset_t mask;
compat_uptr_t handler, restorer;
if (get_user((long)new_ka.sa.sa_handler, &act->sa_handler) || if (get_user(handler, &act->sa_handler) ||
__get_user((long)new_ka.sa.sa_restorer, &act->sa_restorer) || __get_user(restorer, &act->sa_restorer) ||
__get_user(new_ka.sa.sa_flags, &act->sa_flags) || __get_user(new_ka.sa.sa_flags, &act->sa_flags) ||
__get_user(mask, &act->sa_mask)) __get_user(mask, &act->sa_mask))
return -EFAULT; return -EFAULT;
new_ka.sa.sa_handler = compat_ptr(handler);
new_ka.sa.sa_restorer = compat_ptr(restorer);
siginitset(&new_ka.sa.sa_mask, mask); siginitset(&new_ka.sa.sa_mask, mask);
} }
...@@ -354,7 +357,10 @@ long sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, ...@@ -354,7 +357,10 @@ long sys32_rt_sigaction(int sig, const struct sigaction32 __user *act,
return -EINVAL; return -EINVAL;
if (act) { if (act) {
ret = get_user((long)new_ka.sa.sa_handler, &act->sa_handler); compat_uptr_t handler;
ret = get_user(handler, &act->sa_handler);
new_ka.sa.sa_handler = compat_ptr(handler);
ret |= __copy_from_user(&set32, &act->sa_mask, ret |= __copy_from_user(&set32, &act->sa_mask,
sizeof(compat_sigset_t)); sizeof(compat_sigset_t));
sigset_from_compat(&new_ka.sa.sa_mask, &set32); sigset_from_compat(&new_ka.sa.sa_mask, &set32);
...@@ -596,6 +602,7 @@ int sys32_sigaltstack(u32 __new, u32 __old, int r5, ...@@ -596,6 +602,7 @@ int sys32_sigaltstack(u32 __new, u32 __old, int r5,
int ret; int ret;
mm_segment_t old_fs; mm_segment_t old_fs;
unsigned long sp; unsigned long sp;
compat_uptr_t ss_sp;
/* /*
* set sp to the user stack on entry to the system call * set sp to the user stack on entry to the system call
...@@ -604,11 +611,13 @@ int sys32_sigaltstack(u32 __new, u32 __old, int r5, ...@@ -604,11 +611,13 @@ int sys32_sigaltstack(u32 __new, u32 __old, int r5,
sp = regs->gpr[1]; sp = regs->gpr[1];
/* Put new stack info in local 64 bit stack struct */ /* Put new stack info in local 64 bit stack struct */
if (newstack && if (newstack) {
(get_user((long)uss.ss_sp, &newstack->ss_sp) || if (get_user(ss_sp, &newstack->ss_sp) ||
__get_user(uss.ss_flags, &newstack->ss_flags) || __get_user(uss.ss_flags, &newstack->ss_flags) ||
__get_user(uss.ss_size, &newstack->ss_size))) __get_user(uss.ss_size, &newstack->ss_size))
return -EFAULT; return -EFAULT;
uss.ss_sp = compat_ptr(ss_sp);
}
old_fs = get_fs(); old_fs = get_fs();
set_fs(KERNEL_DS); set_fs(KERNEL_DS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment