From: Masami Hiramatsu <mhiramat@kernel.org>
To: Ingo Molnar <mingo@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H . Peter Anvin" <hpa@zytor.com>
Subject: [PATCH tip/master 2/2] kprobes: x86: Use hlist_for_each_entry() for first loop
Date: Mon, 6 Feb 2017 18:55:43 +0900 [thread overview]
Message-ID: <148637493309.19245.12546866092052500584.stgit@devbox> (raw)
In-Reply-To: <148637479268.19245.5046175731172022619.stgit@devbox>
Use hlist_for_each_entry() for first loop on kretprobe
trampoline_handler because it doesn't change the hlist.
Signed-off-by: Masami Hiramatsu <mhiramat@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;
next prev parent reply other threads:[~2017-02-06 9:56 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 ` Masami Hiramatsu [this message]
2017-02-06 10:10 ` [tip:perf/core] kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe() tip-bot for Masami Hiramatsu
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=148637493309.19245.12546866092052500584.stgit@devbox \
--to=mhiramat@kernel.org \
--cc=ananth@linux.vnet.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--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