]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
sched/preempt: Fix preempt notifiers documentation about hlist_del() within unsafe...
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 17 May 2015 16:53:10 +0000 (12:53 -0400)
committerIngo Molnar <mingo@kernel.org>
Fri, 19 Jun 2015 08:06:44 +0000 (10:06 +0200)
commitd84525a845cc2617d638349f8756a9fec9ac8113
tree0f16e6ed6c719791c9ad21cd14240bf9fca092ab
parentb17718d02f54b90978d0e0146368b512b11c3e84
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