Merge branch 'next-seccomp' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[sfrench/cifs-2.6.git] / kernel / ptrace.c
index 58291e9f3276b23cff0f67e770f914cff02e9ba3..5e1d713c8e61f92e77fd0b3e4f46a678f2500a15 100644 (file)
@@ -659,7 +659,7 @@ static int ptrace_getsiginfo(struct task_struct *child, siginfo_t *info)
        if (lock_task_sighand(child, &flags)) {
                error = -EINVAL;
                if (likely(child->last_siginfo != NULL)) {
        if (lock_task_sighand(child, &flags)) {
                error = -EINVAL;
                if (likely(child->last_siginfo != NULL)) {
-                       *info = *child->last_siginfo;
+                       copy_siginfo(info, child->last_siginfo);
                        error = 0;
                }
                unlock_task_sighand(child, &flags);
                        error = 0;
                }
                unlock_task_sighand(child, &flags);
@@ -675,7 +675,7 @@ static int ptrace_setsiginfo(struct task_struct *child, const siginfo_t *info)
        if (lock_task_sighand(child, &flags)) {
                error = -EINVAL;
                if (likely(child->last_siginfo != NULL)) {
        if (lock_task_sighand(child, &flags)) {
                error = -EINVAL;
                if (likely(child->last_siginfo != NULL)) {
-                       *child->last_siginfo = *info;
+                       copy_siginfo(child->last_siginfo, info);
                        error = 0;
                }
                unlock_task_sighand(child, &flags);
                        error = 0;
                }
                unlock_task_sighand(child, &flags);
@@ -1230,7 +1230,6 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
                break;
 
        case PTRACE_SETSIGINFO:
                break;
 
        case PTRACE_SETSIGINFO:
-               memset(&siginfo, 0, sizeof siginfo);
                if (copy_siginfo_from_user32(
                            &siginfo, (struct compat_siginfo __user *) datap))
                        ret = -EFAULT;
                if (copy_siginfo_from_user32(
                            &siginfo, (struct compat_siginfo __user *) datap))
                        ret = -EFAULT;