KVM: Protect device ops->create and list_add with kvm->lock
[cascardo/linux.git] / include / linux / kvm_host.h
index d3c9b82..9c28b4d 100644 (file)
@@ -1113,6 +1113,12 @@ struct kvm_device {
 /* create, destroy, and name are mandatory */
 struct kvm_device_ops {
        const char *name;
+
+       /*
+        * create is called holding kvm->lock and any operations not suitable
+        * to do while holding the lock should be deferred to init (see
+        * below).
+        */
        int (*create)(struct kvm_device *dev, u32 type);
 
        /*