On Wed, 2014-12-03 at 16:01 -0800, [email protected] wrote:
> The patch titled
>      Subject: all arches, signal: move restart_block to struct task_struct
> has been added to the -mm tree.  Its filename is
>      all-arches-signal-move-restart_block-to-struct-task_struct.patch
> 
> ------------------------------------------------------
> From: Andy Lutomirski <[email protected]>
> Subject: all arches, signal: move restart_block to struct task_struct
> 
> diff -puN 
> arch/powerpc/include/asm/thread_info.h~all-arches-signal-move-restart_block-to-struct-task_struct
>  arch/powerpc/include/asm/thread_info.h
> --- 
> a/arch/powerpc/include/asm/thread_info.h~all-arches-signal-move-restart_block-to-struct-task_struct
> +++ a/arch/powerpc/include/asm/thread_info.h
> @@ -43,7 +43,6 @@ struct thread_info {
>       int             cpu;                    /* cpu we're on */
>       int             preempt_count;          /* 0 => preemptable,
>                                                  <0 => BUG */
> -     struct restart_block restart_block;
>       unsigned long   local_flags;            /* private flags for thread */
>  
>       /* low level flags - has atomic operations done on it */
> @@ -59,9 +58,6 @@ struct thread_info {
>       .exec_domain =  &default_exec_domain,   \
>       .cpu =          0,                      \
>       .preempt_count = INIT_PREEMPT_COUNT,    \
> -     .restart_block = {                      \
> -             .fn = do_no_restart_syscall,    \
> -     },                                      \
>       .flags =        0,                      \
>  }
>  
> diff -puN 
> arch/powerpc/kernel/signal_32.c~all-arches-signal-move-restart_block-to-struct-task_struct
>  arch/powerpc/kernel/signal_32.c
> --- 
> a/arch/powerpc/kernel/signal_32.c~all-arches-signal-move-restart_block-to-struct-task_struct
> +++ a/arch/powerpc/kernel/signal_32.c
> @@ -1231,7 +1231,7 @@ long sys_rt_sigreturn(int r3, int r4, in
>       int tm_restore = 0;
>  #endif
>       /* Always make any pending restarted system calls return -EINTR */
> -     current_thread_info()->restart_block.fn = do_no_restart_syscall;
> +     current->restart_block.fn = do_no_restart_syscall;
>  
>       rt_sf = (struct rt_sigframe __user *)
>               (regs->gpr[1] + __SIGNAL_FRAMESIZE + 16);
> @@ -1504,7 +1504,7 @@ long sys_sigreturn(int r3, int r4, int r
>  #endif
>  
>       /* Always make any pending restarted system calls return -EINTR */
> -     current_thread_info()->restart_block.fn = do_no_restart_syscall;
> +     current->restart_block.fn = do_no_restart_syscall;
>  
>       sf = (struct sigframe __user *)(regs->gpr[1] + __SIGNAL_FRAMESIZE);
>       sc = &sf->sctx;
> diff -puN 
> arch/powerpc/kernel/signal_64.c~all-arches-signal-move-restart_block-to-struct-task_struct
>  arch/powerpc/kernel/signal_64.c
> --- 
> a/arch/powerpc/kernel/signal_64.c~all-arches-signal-move-restart_block-to-struct-task_struct
> +++ a/arch/powerpc/kernel/signal_64.c
> @@ -666,7 +666,7 @@ int sys_rt_sigreturn(unsigned long r3, u
>  #endif
>  
>       /* Always make any pending restarted system calls return -EINTR */
> -     current_thread_info()->restart_block.fn = do_no_restart_syscall;
> +     current->restart_block.fn = do_no_restart_syscall;
>  
>       if (!access_ok(VERIFY_READ, uc, sizeof(*uc)))
>               goto badframe;


This looks OK to me.

Gave it a quick boot test and it seems happy. I assume if you'd broken it
things would have gone badly pretty fast :)

Acked-by: Michael Ellerman <[email protected]> (powerpc)

cheers


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to