From: Dan Carpenter <dan.carpenter@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>, Michal Hocko <mhocko@suse.cz>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Rik van Riel <riel@redhat.com>,
Ionut Alexa <ionut.m.alexa@gmail.com>,
Peter Hurley <peter@hurleysoftware.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] exit: silence a bogus static checker warning
Date: Tue, 18 Nov 2014 10:44:22 +0300 [thread overview]
Message-ID: <20141118074422.GA17829@mwanda> (raw)
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.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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)
next reply other threads:[~2014-11-18 7:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 7:44 Dan Carpenter [this message]
2014-11-18 15:39 ` [patch] exit: silence a bogus static checker warning Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141118074422.GA17829@mwanda \
--to=dan.carpenter@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=ionut.m.alexa@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peter@hurleysoftware.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox