]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
s390/compat: fix setup_frame32
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 6 Apr 2018 16:10:04 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Apr 2018 06:55:12 +0000 (08:55 +0200)
commit 8b09ca746a643ca452cd41a522046a96ee5a55fd upstream.

Git commit c60a03fee0e5 ("s390: switch to {get,put}_compat_sigset()")
contains a typo and now copies the wrong pointer to user space.
Use the correct pointer instead.

Reported-and-tested-by: Stefan Liebler <stli@linux.vnet.ibm.com>
Fixes: c60a03fee0e5 ("s390: switch to {get,put}_compat_sigset()")
Cc: <stable@vger.kernel.org> # v4.15+
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kernel/compat_signal.c

index ef246940b44c514f7c3c101b6b65f20cf20be7df..f19e90856e49d7f8d667e904626df528bae0ecd7 100644 (file)
@@ -379,7 +379,7 @@ static int setup_frame32(struct ksignal *ksig, sigset_t *set,
        if (put_compat_sigset((compat_sigset_t __user *)frame->sc.oldmask,
                              set, sizeof(compat_sigset_t)))
                return -EFAULT;
-       if (__put_user(ptr_to_compat(&frame->sc), &frame->sc.sregs))
+       if (__put_user(ptr_to_compat(&frame->sregs), &frame->sc.sregs))
                return -EFAULT;
 
        /* Store registers needed to create the signal frame */