From: tip-bot for Masami Hiramatsu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com,
ananth@linux.vnet.ibm.com, mingo@kernel.org,
peterz@infradead.org, mhiramat@kernel.org,
torvalds@linux-foundation.org
Subject: [tip:perf/core] kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe()
Date: Mon, 6 Feb 2017 02:10:42 -0800 [thread overview]
Message-ID: <tip-b6263178b8dbd9fe70d55f136c2a1da39309520e@git.kernel.org> (raw)
In-Reply-To: <148637493309.19245.12546866092052500584.stgit@devbox>
Commit-ID: b6263178b8dbd9fe70d55f136c2a1da39309520e
Gitweb: http://git.kernel.org/tip/b6263178b8dbd9fe70d55f136c2a1da39309520e
Author: Masami Hiramatsu <mhiramat@kernel.org>
AuthorDate: Mon, 6 Feb 2017 18:55:43 +0900
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 6 Feb 2017 11:07:07 +0100
kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe()
Use hlist_for_each_entry() in the first loop in the kretprobe
trampoline_handler() function, because it doesn't change the hlist.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/148637493309.19245.12546866092052500584.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/kprobes/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index eb35093..520b8df 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -745,7 +745,7 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)
* will be the real return address, and all the rest will
* point to kretprobe_trampoline.
*/
- hlist_for_each_entry_safe(ri, tmp, head, hlist) {
+ hlist_for_each_entry(ri, head, hlist) {
if (ri->task != current)
/* another task is sharing our hash bucket */
continue;
prev parent reply other threads:[~2017-02-06 10:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 9:53 [PATCH tip/master 0/2] kprobes: trivial cleanups Masami Hiramatsu
2017-02-06 9:54 ` [PATCH tip/master 1/2] arm64: kprobes: Remove redundant dependency in Kconfig Masami Hiramatsu
2017-02-06 10:10 ` [tip:perf/core] kprobes/arm64: Remove a redundant dependency from the Kconfig tip-bot for Masami Hiramatsu
2017-02-06 9:55 ` [PATCH tip/master 2/2] kprobes: x86: Use hlist_for_each_entry() for first loop Masami Hiramatsu
2017-02-06 10:10 ` tip-bot for Masami Hiramatsu [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-b6263178b8dbd9fe70d55f136c2a1da39309520e@git.kernel.org \
--to=tipbot@zytor.com \
--cc=ananth@linux.vnet.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome