Re: [PATCH kernel] KVM: Don't null dereference ops->destroy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/31/22 06:32, Alexey Kardashevskiy wrote:
- ops->destroy(dev); +        if (ops->destroy)
+            ops->destroy(dev);


btw why is destroy() not under the kvm->lock here? The comment in kvm_destroy_devices() suggests that it is an exception there but not necessarily here. Thanks,

The comment refers to walking the list. The ops->destroy contract is that it's called outside kvm->lock, and that's followed in both places (both before and after the suggested patch).

Paolo




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux