From: tip-bot for Dan Carpenter <dan.carpenter@oracle.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, namhyung@gmail.com, fweisbec@gmail.com,
tglx@linutronix.de, mingo@elte.hu, dan.carpenter@oracle.com,
clemens@ladisch.de
Subject: [tip:perf/urgent] x86/dumpstack: Remove unneeded check in dump_trace()
Date: Mon, 30 Jan 2012 05:20:51 -0800 [thread overview]
Message-ID: <tip-d0caf292505d051b1026e85faf3a85e907566f31@git.kernel.org> (raw)
In-Reply-To: <20120128105246.GA25092@elgon.mountain>
Commit-ID: d0caf292505d051b1026e85faf3a85e907566f31
Gitweb: http://git.kernel.org/tip/d0caf292505d051b1026e85faf3a85e907566f31
Author: Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Sat, 28 Jan 2012 13:52:46 +0300
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 28 Jan 2012 13:09:06 +0100
x86/dumpstack: Remove unneeded check in dump_trace()
Smatch complains that we have some inconsistent NULL checking.
If "task" were NULL then it would lead to a NULL dereference
later. We can remove this test because earlier on in the
function we have:
if (!task)
task = current;
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Clemens Ladisch <clemens@ladisch.de>
Link: http://lkml.kernel.org/r/20120128105246.GA25092@elgon.mountain
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/dumpstack_64.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 6d728d9..af7785f 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -129,7 +129,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
if (!stack) {
if (regs)
stack = (unsigned long *)regs->sp;
- else if (task && task != current)
+ else if (task != current)
stack = (unsigned long *)task->thread.sp;
else
stack = &dummy;
prev parent reply other threads:[~2012-01-30 13:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-28 10:52 [patch] x86, dumpstack: removed " Dan Carpenter
2012-01-28 11:00 ` Frederic Weisbecker
2012-01-30 13:20 ` tip-bot for Dan Carpenter [this message]
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=tip-d0caf292505d051b1026e85faf3a85e907566f31@git.kernel.org \
--to=dan.carpenter@oracle.com \
--cc=a.p.zijlstra@chello.nl \
--cc=clemens@ladisch.de \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=namhyung@gmail.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome