]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm64: compat: use compat_uptr_t type for compat_ucontext.uc_link
authorWill Deacon <will.deacon@arm.com>
Wed, 6 Feb 2013 11:42:23 +0000 (11:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Feb 2013 13:38:38 +0000 (05:38 -0800)
commit c0e01d5d8f15c085236df184e5bc3d79a8b700cd upstream.

struct compat_ucontext * is a 64-bit pointer, so we need to use a
compat_uptr_t instead to avoid declaring a structure incompatible with
what AArch32 userspace expects.

Reported-by: Edmund Grimley-Evans <Edmund.Grimley-Evans@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/signal32.c

index a4db3d22aac4802972fd4685e7c96e0c9d706b2c..41db148a7eb9c49cae876311600dfc960fd59ad3 100644 (file)
@@ -76,7 +76,7 @@ struct compat_sigcontext {
 
 struct compat_ucontext {
        compat_ulong_t                  uc_flags;
-       struct compat_ucontext          *uc_link;
+       compat_uptr_t                   uc_link;
        compat_stack_t                  uc_stack;
        struct compat_sigcontext        uc_mcontext;
        compat_sigset_t                 uc_sigmask;
@@ -703,7 +703,7 @@ int compat_setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
        err |= copy_siginfo_to_user32(&frame->info, info);
 
        __put_user_error(0, &frame->sig.uc.uc_flags, err);
-       __put_user_error(NULL, &frame->sig.uc.uc_link, err);
+       __put_user_error(0, &frame->sig.uc.uc_link, err);
 
        memset(&stack, 0, sizeof(stack));
        stack.ss_sp = (compat_uptr_t)current->sas_ss_sp;