linux-next: manual merge of the tip tree with Linus' tree

From: Stephen Rothwell
Date: Sun Jul 05 2015 - 20:09:16 EST


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@xxxxxxxxxxxxxxxx

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(&notifier->link, &current->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(&notifier->link);
+ preempt_enable();
-
- static_key_slow_dec(&preempt_notifier_key);
}
EXPORT_SYMBOL_GPL(preempt_notifier_unregister);

Attachment: pgprM32JpPblF.pgp
Description: OpenPGP digital signature