--- m/net/bluetooth/hci_sock.c 2022-08-23 18:36:25.279545700 +0800 +++ n/net/bluetooth/hci_sock.c 2022-08-23 18:40:14.540884400 +0800 @@ -887,7 +887,6 @@ static int hci_sock_release(struct socke */ hci_dev_do_close(hdev); hci_dev_clear_flag(hdev, HCI_USER_CHANNEL); - hci_register_suspend_notifier(hdev); mgmt_index_added(hdev); } @@ -1216,7 +1215,6 @@ static int hci_sock_bind(struct socket * } mgmt_index_removed(hdev); - hci_unregister_suspend_notifier(hdev); err = hci_dev_open(hdev->id); if (err) { @@ -1231,7 +1229,6 @@ static int hci_sock_bind(struct socket * err = 0; } else { hci_dev_clear_flag(hdev, HCI_USER_CHANNEL); - hci_register_suspend_notifier(hdev); mgmt_index_added(hdev); hci_dev_put(hdev); goto done; --- m/virt/kvm/kvm_main.c 2022-08-23 18:37:50.109091400 +0800 +++ n/virt/kvm/kvm_main.c 2022-08-23 18:42:49.746773700 +0800 @@ -1229,7 +1229,7 @@ static struct kvm *kvm_create_vm(unsigne */ if (!try_module_get(kvm_chardev_ops.owner)) { r = -ENODEV; - goto out_err_mmu_notifier; + goto out_err_pm_notifier; } r = kvm_create_vm_debugfs(kvm, fdname); @@ -1240,6 +1240,11 @@ static struct kvm *kvm_create_vm(unsigne out_err: module_put(kvm_chardev_ops.owner); +out_err_pm_notifier: + kvm_destroy_pm_notifier(kvm); + mutex_lock(&kvm_lock); + list_del(&kvm->vm_list); + mutex_unlock(&kvm_lock); out_err_mmu_notifier: #if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER) if (kvm->mmu_notifier.ops)