From: Joe Perches <joe@perches.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jiri Slaby <jslaby@suse.cz>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [GIT pull] core/urgent for v5.4-rc7
Date: Sun, 10 Nov 2019 14:00:44 -0800 [thread overview]
Message-ID: <698b03300532f80dfbd30fa35446a33e58ae0c89.camel@perches.com> (raw)
In-Reply-To: <157338131323.14789.2179255265964358886.tglx@nanos.tec.linutronix.de>
On Sun, 2019-11-10 at 10:21 +0000, Thomas Gleixner wrote:
> A small fix for a stacktrace regression. Saving a stacktrace for a foreign
> task skipped an extra entry which makes e.g. the output of /proc/$PID/stack
> incomplete.
[]
> ------------------>
> Jiri Slaby (1):
> stacktrace: Don't skip first entry on noncurrent tasks
[]
> diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
[]
> @@ -141,7 +141,8 @@ unsigned int stack_trace_save_tsk(struct task_struct *tsk, unsigned long *store,
> struct stacktrace_cookie c = {
> .store = store,
> .size = size,
> - .skip = skipnr + 1,
> + /* skip this function if they are tracing us */
> + .skip = skipnr + !!(current == tsk),
trivia:
This idiom '!!(logical test)' is odd and redundant.
Logical test result is already 0 or 1, no !! is unnecessary.
> };
>
> if (!try_get_task_stack(tsk))
> @@ -298,7 +299,8 @@ unsigned int stack_trace_save_tsk(struct task_struct *task,
> struct stack_trace trace = {
> .entries = store,
> .max_entries = size,
> - .skip = skipnr + 1,
> + /* skip this function if they are tracing us */
> + .skip = skipnr + !!(current == task),
> };
>
> save_stack_trace_tsk(task, &trace);
>
>
next prev parent reply other threads:[~2019-11-10 22:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-10 10:21 Thomas Gleixner
2019-11-10 10:21 ` [GIT pull] sched/urgent " Thomas Gleixner
2019-11-10 21:00 ` pr-tracker-bot
2019-11-10 10:21 ` [GIT pull] irq/urgent " Thomas Gleixner
2019-11-10 21:00 ` pr-tracker-bot
2019-11-10 10:21 ` [GIT pull] perf/urgent " Thomas Gleixner
2019-11-10 21:00 ` pr-tracker-bot
2019-11-10 10:21 ` [GIT pull] x86/urgent " Thomas Gleixner
2019-11-10 21:00 ` pr-tracker-bot
2019-11-10 10:21 ` [GIT pull] timers/urgent " Thomas Gleixner
2019-11-10 21:00 ` pr-tracker-bot
2019-11-10 21:00 ` [GIT pull] core/urgent " pr-tracker-bot
2019-11-10 22:00 ` Joe Perches [this message]
2019-11-10 22:35 ` Linus Torvalds
2019-11-11 1:50 ` Joe Perches
2019-11-11 17:12 ` Linus Torvalds
2019-11-12 1:37 ` Joe Perches
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=698b03300532f80dfbd30fa35446a33e58ae0c89.camel@perches.com \
--to=joe@perches.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®