From: tip-bot for Mathieu Desnoyers <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:sched/core] sched/preempt: Fix preempt notifiers documentation about hlist_del() within unsafe iteration
Date: Fri, 19 Jun 2015 11:00:57 -0700 [thread overview]
Message-ID: <tip-d84525a845cc2617d638349f8756a9fec9ac8113@git.kernel.org> (raw)
In-Reply-To: <1431881590-1456-1-git-send-email-mathieu.desnoyers@efficios.com>
Commit-ID: d84525a845cc2617d638349f8756a9fec9ac8113
Gitweb: http://git.kernel.org/tip/d84525a845cc2617d638349f8756a9fec9ac8113
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
AuthorDate: Sun, 17 May 2015 12:53:10 -0400
Committer: Ingo Molnar <mingo@kernel.org>
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.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/1431881590-1456-1-git-send-email-mathieu.desnoyers@efficios.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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/
prev parent reply other threads:[~2015-06-19 18:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-17 16:53 [RFC PATCH] Cleanup: preempt notifiers: disallow hlist_del " Mathieu Desnoyers
2015-06-19 18:00 ` tip-bot for Mathieu Desnoyers [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-d84525a845cc2617d638349f8756a9fec9ac8113@git.kernel.org \
--to=tipbot@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--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