diff options
| author | Jens Axboe <axboe@kernel.dk> | 2017-08-28 13:00:44 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2017-08-28 13:00:44 -0600 |
| commit | cd996fb47c360320cf25ac9503c16de085ea9cfc (patch) | |
| tree | 38a4730b2c031afe7daf632064f9687f1e09194e /include/linux/kvm_host.h | |
| parent | e9a823fb34a8b0fcba6e112aa1003258a1a5af50 (diff) | |
| parent | cc4a41fe5541a73019a864883297bd5043aa6d98 (diff) | |
| download | lwn-cd996fb47c360320cf25ac9503c16de085ea9cfc.tar.gz lwn-cd996fb47c360320cf25ac9503c16de085ea9cfc.zip | |
Merge tag 'v4.13-rc7' into for-4.14/block-postmerge
Linux 4.13-rc7
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/kvm_host.h')
| -rw-r--r-- | include/linux/kvm_host.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 890b706d1943..21a6fd6c44af 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -477,7 +477,8 @@ struct kvm { static inline struct kvm_io_bus *kvm_get_bus(struct kvm *kvm, enum kvm_bus idx) { return srcu_dereference_check(kvm->buses[idx], &kvm->srcu, - lockdep_is_held(&kvm->slots_lock)); + lockdep_is_held(&kvm->slots_lock) || + !refcount_read(&kvm->users_count)); } static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i) @@ -570,7 +571,8 @@ void kvm_put_kvm(struct kvm *kvm); static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id) { return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu, - lockdep_is_held(&kvm->slots_lock)); + lockdep_is_held(&kvm->slots_lock) || + !refcount_read(&kvm->users_count)); } static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm) |
