]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 4 Jul 2015 18:29:59 +0000 (11:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 4 Jul 2015 18:29:59 +0000 (11:29 -0700)
Pull kvm fixes from Paolo Bonzini:
 "Except for the preempt notifiers fix, these are all small bugfixes
  that could have been waited for -rc2.  Sending them now since I was
  taking care of Peter's patch anyway"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  kvm: add hyper-v crash msrs values
  KVM: x86: remove data variable from kvm_get_msr_common
  KVM: s390: virtio-ccw: don't overwrite config space values
  KVM: x86: keep track of LVT0 changes under APICv
  KVM: x86: properly restore LVT0
  KVM: x86: make vapics_in_nmi_mode atomic
  sched, preempt_notifier: separate notifier registration from static_key inc/dec

1  2 
kernel/sched/core.c

diff --combined kernel/sched/core.c
index 5caa029dec5df30a3f0fbf3bf6f4c4458c2a7001,552710ab19e0ccb6d726e85880d443d84f9d45ef..78b4bad10081c6b23894ac1d5d7b6900ab32362a
@@@ -2164,7 -2164,7 +2164,7 @@@ int sched_fork(unsigned long clone_flag
        set_task_cpu(p, cpu);
        raw_spin_unlock_irqrestore(&p->pi_lock, flags);
  
 -#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
 +#ifdef CONFIG_SCHED_INFO
        if (likely(sched_info_on()))
                memset(&p->sched_info, 0, sizeof(p->sched_info));
  #endif
@@@ -2320,13 -2320,27 +2320,27 @@@ void wake_up_new_task(struct task_struc
  
  static struct static_key preempt_notifier_key = STATIC_KEY_INIT_FALSE;
  
+ void preempt_notifier_inc(void)
+ {
+       static_key_slow_inc(&preempt_notifier_key);
+ }
+ EXPORT_SYMBOL_GPL(preempt_notifier_inc);
+ void preempt_notifier_dec(void)
+ {
+       static_key_slow_dec(&preempt_notifier_key);
+ }
+ EXPORT_SYMBOL_GPL(preempt_notifier_dec);
  /**
   * preempt_notifier_register - tell me when current is being preempted & rescheduled
   * @notifier: notifier struct to register
   */
  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");
        hlist_add_head(&notifier->link, &current->preempt_notifiers);
  }
  EXPORT_SYMBOL_GPL(preempt_notifier_register);
  void preempt_notifier_unregister(struct preempt_notifier *notifier)
  {
        hlist_del(&notifier->link);
-       static_key_slow_dec(&preempt_notifier_key);
  }
  EXPORT_SYMBOL_GPL(preempt_notifier_unregister);