From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829AbdBFKLP (ORCPT ); Mon, 6 Feb 2017 05:11:15 -0500 Received: from terminus.zytor.com ([65.50.211.136]:36236 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555AbdBFKLO (ORCPT ); Mon, 6 Feb 2017 05:11:14 -0500 Date: Mon, 6 Feb 2017 02:10:42 -0800 From: tip-bot for Masami Hiramatsu Message-ID: 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 Reply-To: torvalds@linux-foundation.org, mhiramat@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, ananth@linux.vnet.ibm.com In-Reply-To: <148637493309.19245.12546866092052500584.stgit@devbox> References: <148637493309.19245.12546866092052500584.stgit@devbox> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe() Git-Commit-ID: b6263178b8dbd9fe70d55f136c2a1da39309520e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b6263178b8dbd9fe70d55f136c2a1da39309520e Gitweb: http://git.kernel.org/tip/b6263178b8dbd9fe70d55f136c2a1da39309520e Author: Masami Hiramatsu AuthorDate: Mon, 6 Feb 2017 18:55:43 +0900 Committer: Ingo Molnar 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 Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/148637493309.19245.12546866092052500584.stgit@devbox Signed-off-by: Ingo Molnar --- 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;