From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755011AbbFSSCC (ORCPT ); Fri, 19 Jun 2015 14:02:02 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49276 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753838AbbFSSBx (ORCPT ); Fri, 19 Jun 2015 14:01:53 -0400 Date: Fri, 19 Jun 2015 11:00:57 -0700 From: tip-bot for Mathieu Desnoyers Message-ID: Cc: peterz@infradead.org, akpm@linux-foundation.org, torvalds@linux-foundation.org, tglx@linutronix.de, bp@alien8.de, mathieu.desnoyers@efficios.com, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org Reply-To: akpm@linux-foundation.org, peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, torvalds@linux-foundation.org In-Reply-To: <1431881590-1456-1-git-send-email-mathieu.desnoyers@efficios.com> References: <1431881590-1456-1-git-send-email-mathieu.desnoyers@efficios.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/preempt: Fix preempt notifiers documentation about hlist_del() within unsafe iteration Git-Commit-ID: d84525a845cc2617d638349f8756a9fec9ac8113 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: d84525a845cc2617d638349f8756a9fec9ac8113 Gitweb: http://git.kernel.org/tip/d84525a845cc2617d638349f8756a9fec9ac8113 Author: Mathieu Desnoyers AuthorDate: Sun, 17 May 2015 12:53:10 -0400 Committer: Ingo Molnar CommitDate: Fri, 19 Jun 2015 10:06:44 +0200 sched/preempt: Fix preempt notifiers documentation about hlist_del() within unsafe iteration preempt_notifier_unregister() documents: "This is safe to call from within a preemption notifier." However, both fire_sched_in_preempt_notifiers() and fire_sched_out_preempt_notifiers() are using hlist_for_each_entry(), which is not safe against entry removal during iteration. Inspection of the KVM code does not reveal any use of preempt_notifier_unregister() within the preempt notifiers. Therefore, fix the comment. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1431881590-1456-1-git-send-email-mathieu.desnoyers@efficios.com Signed-off-by: Ingo Molnar --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index af0a5a6..bdb7aa6 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2165,7 +2165,7 @@ EXPORT_SYMBOL_GPL(preempt_notifier_register); * preempt_notifier_unregister - no longer interested in preemption notifications * @notifier: notifier struct to unregister * - * This is safe to call from within a preemption notifier. + * This is *not* safe to call from within a preemption notifier. */ void preempt_notifier_unregister(struct preempt_notifier *notifier) { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/