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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 29 Jan 2020 13:30:47 +0100
From:   Oleg Nesterov <oleg@...hat.com>
To:     madhuparnabhowmik10@...il.com
Cc:     peterz@...radead.org, mingo@...nel.org,
        christian.brauner@...ntu.com, paulmck@...nel.org,
        linux-kernel@...r.kernel.org, joel@...lfernandes.org,
        linux-kernel-mentees@...ts.linuxfoundation.org, rcu@...r.kernel.org
Subject: Re: [PATCH] exit.c: Fix Sparse errors and warnings

On 01/28, madhuparnabhowmik10@...il.com wrote:
>
> kernel/exit.c:626:40: warning: incorrect type in assignment
> 
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
> ---
>  kernel/exit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/exit.c b/kernel/exit.c
> index bcbd59888e67..c5a9d6360440 100644
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -623,8 +623,8 @@ static void forget_original_parent(struct task_struct *father,
>  	reaper = find_new_reaper(father, reaper);
>  	list_for_each_entry(p, &father->children, sibling) {
>  		for_each_thread(p, t) {
> -			t->real_parent = reaper;
> -			BUG_ON((!t->ptrace) != (t->parent == father));
> +			rcu_assign_pointer(t->real_parent, reaper);

Another case when RCU_INIT_POINTER() makes more sense (although to me it
too looks confusing). We didn't modify the new parent.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ