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]
Message-ID: <20141118153932.GA3790@redhat.com>
Date:	Tue, 18 Nov 2014 16:39:32 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Michal Hocko <mhocko@...e.cz>, Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Rik van Riel <riel@...hat.com>,
	Ionut Alexa <ionut.m.alexa@...il.com>,
	Peter Hurley <peter@...leysoftware.com>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] exit: silence a bogus static checker warning

On 11/18, Dan Carpenter wrote:
>
> Smatch complains about this:
>
> 	kernel/exit.c:543 forget_original_parent()
> 	warn: add some parenthesis here?
>
> I don't normally advocate changing the code to make the static checker
> happy but these are normally precedence bugs so I think it's ok to put
> parenthesis so it's clear the code is deliberate.

I still think that "if (!A == B)" doesn't look as a potential precedence
bug, but I won't argue.

Andrew, this fixes   exit-reparent-cleanup-the-changing-of-parent.patch
in -mm tree.

> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/kernel/exit.c b/kernel/exit.c
> index 6192422..1192d12 100644
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -540,7 +540,7 @@ static void forget_original_parent(struct task_struct *father)
>  	list_for_each_entry(p, &father->children, sibling) {
>  		for_each_thread(p, t) {
>  			t->real_parent = reaper;
> -			BUG_ON(!t->ptrace != (t->parent == father));
> +			BUG_ON((!t->ptrace) != (t->parent == father));
>  			if (likely(!t->ptrace))
>  				t->parent = t->real_parent;
>  			if (t->pdeath_signal)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ