Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=62715ec832c7229b677415901e98799124efb023
Commit:     62715ec832c7229b677415901e98799124efb023
Parent:     c1e49e3a1b37e5fbeb6923d4a950ec1fea8388fa
Author:     Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 14:37:54 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 14:37:54 2007 -0700

    [SPARC64]: Kill bogus set_fs(KERNEL_DS) in do_rt_sigreturn().
    
    From: Oleg Nesterov <[EMAIL PROTECTED]>
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 arch/sparc64/kernel/signal.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
index 203e873..fb13775 100644
--- a/arch/sparc64/kernel/signal.c
+++ b/arch/sparc64/kernel/signal.c
@@ -289,9 +289,7 @@ void do_rt_sigreturn(struct pt_regs *regs)
        struct rt_signal_frame __user *sf;
        unsigned long tpc, tnpc, tstate;
        __siginfo_fpu_t __user *fpu_save;
-       mm_segment_t old_fs;
        sigset_t set;
-       stack_t st;
        int err;
 
        /* Always make any pending restarted system calls return -EINTR */
@@ -327,20 +325,13 @@ void do_rt_sigreturn(struct pt_regs *regs)
                err |= restore_fpu_state(regs, &sf->fpu_state);
 
        err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t));
-       err |= __copy_from_user(&st, &sf->stack, sizeof(stack_t));
-       
+       err |= do_sigaltstack(&sf->stack, NULL, (unsigned long)sf);
+
        if (err)
                goto segv;
-               
+
        regs->tpc = tpc;
        regs->tnpc = tnpc;
-       
-       /* It is more difficult to avoid calling this function than to
-          call it and ignore errors.  */
-       old_fs = get_fs();
-       set_fs(KERNEL_DS);
-       do_sigaltstack((const stack_t __user *) &st, NULL, (unsigned long)sf);
-       set_fs(old_fs);
 
        sigdelsetmask(&set, ~_BLOCKABLE);
        spin_lock_irq(&current->sighand->siglock);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to