The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Re: + all-arches-signal-move-restart_block-to-struct-task_struct.patch added to -mm tree
       [not found] <547fa457.hlgB/Ig+t6HXFsjh%akpm@linux-foundation.org>
@ 2014-12-04  2:38 ` Michael Ellerman
  0 siblings, 0 replies; only message in thread
From: Michael Ellerman @ 2014-12-04  2:38 UTC (permalink / raw)
  To: luto; +Cc: LKML, mm-commits, akpm

On Wed, 2014-12-03 at 16:01 -0800, akpm@linux-foundation.org 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 <luto@amacapital.net>
> 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 <mpe@ellerman.id.au> (powerpc)

cheers



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-04  2:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <547fa457.hlgB/Ig+t6HXFsjh%akpm@linux-foundation.org>
2014-12-04  2:38 ` + all-arches-signal-move-restart_block-to-struct-task_struct.patch added to -mm tree Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox