diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2017-02-06 04:55:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-02-06 05:07:07 -0500 |
commit | b6263178b8dbd9fe70d55f136c2a1da39309520e (patch) | |
tree | 42e895e2732e6ee18a7718446101e0b1601e5544 | |
parent | cd1ee3b1e30b4c6c0858e0c0b4ca1b4d86020ada (diff) |
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>
-rw-r--r-- | arch/x86/kernel/kprobes/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c index eb3509338ae0..520b8dfe1640 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) | |||
745 | * will be the real return address, and all the rest will | 745 | * will be the real return address, and all the rest will |
746 | * point to kretprobe_trampoline. | 746 | * point to kretprobe_trampoline. |
747 | */ | 747 | */ |
748 | hlist_for_each_entry_safe(ri, tmp, head, hlist) { | 748 | hlist_for_each_entry(ri, head, hlist) { |
749 | if (ri->task != current) | 749 | if (ri->task != current) |
750 | /* another task is sharing our hash bucket */ | 750 | /* another task is sharing our hash bucket */ |
751 | continue; | 751 | continue; |