[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150706100858.649532b5@canb.auug.org.au>
Date: Mon, 6 Jul 2015 10:08:58 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Paolo Bonzini <pbonzini@...hat.com>
Subject: linux-next: manual merge of the tip tree with Linus' tree
Hi all,
Today's linux-next merge of the tip tree got a conflict in:
kernel/sched/core.c
between commit:
2ecd9d29abb1 ("sched, preempt_notifier: separate notifier registration from static_key inc/dec")
from Linus' tree and commit:
6efde1d3716b ("sched/preempt, kvm: Fix KVM preempt_notifier usage")
from the tip tree.
I fixed it up (maybe - see below) and can carry the fix as necessary
(no action is required).
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
diff --cc kernel/sched/core.c
index 78b4bad10081,850e54b89a11..000000000000
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@@ -2338,10 -2326,13 +2338,15 @@@ EXPORT_SYMBOL_GPL(preempt_notifier_dec)
*/
void preempt_notifier_register(struct preempt_notifier *notifier)
{
- static_key_slow_inc(&preempt_notifier_key);
+ if (!static_key_false(&preempt_notifier_key))
+ WARN(1, "registering preempt_notifier while notifiers disabled\n");
+
+ /*
+ * Avoid preemption while changing the preempt notifier list.
+ */
+ preempt_disable();
hlist_add_head(¬ifier->link, ¤t->preempt_notifiers);
+ preempt_enable();
}
EXPORT_SYMBOL_GPL(preempt_notifier_register);
@@@ -2353,7 -2344,14 +2358,12 @@@
*/
void preempt_notifier_unregister(struct preempt_notifier *notifier)
{
+ /*
+ * Avoid preemption while changing the preempt notifier list.
+ */
+ preempt_disable();
hlist_del(¬ifier->link);
+ preempt_enable();
-
- static_key_slow_dec(&preempt_notifier_key);
}
EXPORT_SYMBOL_GPL(preempt_notifier_unregister);
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists