projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
KVM: Protect device ops->create and list_add with kvm->lock
[cascardo/linux.git]
/
include
/
linux
/
kvm_host.h
diff --git
a/include/linux/kvm_host.h
b/include/linux/kvm_host.h
index
d3c9b82
..
9c28b4d
100644
(file)
--- a/
include/linux/kvm_host.h
+++ b/
include/linux/kvm_host.h
@@
-1113,6
+1113,12
@@
struct kvm_device {
/* create, destroy, and name are mandatory */
struct kvm_device_ops {
const char *name;
/* 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);
/*
int (*create)(struct kvm_device *dev, u32 type);
/*