lkml.org 
[lkml]   [2015]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlinux-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@canb.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(&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);

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-07-06 02:41    [W:0.039 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site