aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index e1f2bf8d7b1e..b5af88167613 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1177,7 +1177,7 @@ static struct file_operations kvm_vcpu_fops = {
1177 */ 1177 */
1178static int create_vcpu_fd(struct kvm_vcpu *vcpu) 1178static int create_vcpu_fd(struct kvm_vcpu *vcpu)
1179{ 1179{
1180 return anon_inode_getfd("kvm-vcpu", &kvm_vcpu_fops, vcpu, 0); 1180 return anon_inode_getfd("kvm-vcpu", &kvm_vcpu_fops, vcpu, O_RDWR);
1181} 1181}
1182 1182
1183/* 1183/*
@@ -1638,7 +1638,7 @@ static int kvm_dev_ioctl_create_vm(void)
1638 kvm = kvm_create_vm(); 1638 kvm = kvm_create_vm();
1639 if (IS_ERR(kvm)) 1639 if (IS_ERR(kvm))
1640 return PTR_ERR(kvm); 1640 return PTR_ERR(kvm);
1641 fd = anon_inode_getfd("kvm-vm", &kvm_vm_fops, kvm, 0); 1641 fd = anon_inode_getfd("kvm-vm", &kvm_vm_fops, kvm, O_RDWR);
1642 if (fd < 0) 1642 if (fd < 0)
1643 kvm_put_kvm(kvm); 1643 kvm_put_kvm(kvm);
1644 1644