lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 27 Feb 2021 09:44:18 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Javier Contreras <contreras.javi.0@...il.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] init: init_task.c: fixed two spaces coding style issue

On Sat, Feb 27, 2021 at 06:01:18PM +0100, Javier Contreras wrote:
> Fixed two spaces coding style issue.
> 
> Signed-off-by: Javier Contreras <contreras.javi.0@...il.com>

I am not maintainer for this code, and also wangjingyu beat you to this
one.  But one question:  Given that this patch would cause "git blame"
to list you as the immediate point of contact for each line changed,
are you ready to answer all questions about each of those lines of code?
For example, given C's default initialization to zero, why is the "mm"
field explicitly set to NULL?

						Thanx, Paul

> ---
>  init/init_task.c | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/init/init_task.c b/init/init_task.c
> index 3711cdaafed2..85d6b045ef7a 100644
> --- a/init/init_task.c
> +++ b/init/init_task.c
> @@ -71,24 +71,24 @@ struct task_struct init_task
>  	.thread_info	= INIT_THREAD_INFO(init_task),
>  	.stack_refcount	= REFCOUNT_INIT(1),
>  #endif
> -	.state		= 0,
> -	.stack		= init_stack,
> -	.usage		= REFCOUNT_INIT(2),
> -	.flags		= PF_KTHREAD,
> -	.prio		= MAX_PRIO - 20,
> -	.static_prio	= MAX_PRIO - 20,
> -	.normal_prio	= MAX_PRIO - 20,
> -	.policy		= SCHED_NORMAL,
> -	.cpus_ptr	= &init_task.cpus_mask,
> -	.cpus_mask	= CPU_MASK_ALL,
> -	.nr_cpus_allowed= NR_CPUS,
> -	.mm		= NULL,
> -	.active_mm	= &init_mm,
> -	.restart_block	= {
> +	.state		 = 0,
> +	.stack		 = init_stack,
> +	.usage		 = REFCOUNT_INIT(2),
> +	.flags		 = PF_KTHREAD,
> +	.prio		 = MAX_PRIO - 20,
> +	.static_prio	 = MAX_PRIO - 20,
> +	.normal_prio	 = MAX_PRIO - 20,
> +	.policy		 = SCHED_NORMAL,
> +	.cpus_ptr	 = &init_task.cpus_mask,
> +	.cpus_mask	 = CPU_MASK_ALL,
> +	.nr_cpus_allowed = NR_CPUS,
> +	.mm		 = NULL,
> +	.active_mm	 = &init_mm,
> +	.restart_block	 = {
>  		.fn = do_no_restart_syscall,
>  	},
>  	.se		= {
> -		.group_node 	= LIST_HEAD_INIT(init_task.se.group_node),
> +		.group_node	= LIST_HEAD_INIT(init_task.se.group_node),
>  	},
>  	.rt		= {
>  		.run_list	= LIST_HEAD_INIT(init_task.rt.run_list),
> -- 
> 2.30.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ