소스 검색

KVM: Return -ENOTTY on unrecognized ioctls

Not the incorrect -EINVAL.

Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity 16 년 전
부모
커밋
367e1319b2
4개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      arch/ia64/kvm/kvm-ia64.c
  2. 1 1
      arch/powerpc/kvm/powerpc.c
  3. 1 1
      arch/s390/kvm/kvm-s390.c
  4. 1 1
      arch/x86/kvm/x86.c

+ 1 - 1
arch/ia64/kvm/kvm-ia64.c

@@ -941,7 +941,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
 {
 	struct kvm *kvm = filp->private_data;
 	void __user *argp = (void __user *)arg;
-	int r = -EINVAL;
+	int r = -ENOTTY;
 
 	switch (ioctl) {
 	case KVM_SET_MEMORY_REGION: {

+ 1 - 1
arch/powerpc/kvm/powerpc.c

@@ -421,7 +421,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
 
 	switch (ioctl) {
 	default:
-		r = -EINVAL;
+		r = -ENOTTY;
 	}
 
 	return r;

+ 1 - 1
arch/s390/kvm/kvm-s390.c

@@ -150,7 +150,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
 		break;
 	}
 	default:
-		r = -EINVAL;
+		r = -ENOTTY;
 	}
 
 	return r;

+ 1 - 1
arch/x86/kvm/x86.c

@@ -2176,7 +2176,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
 {
 	struct kvm *kvm = filp->private_data;
 	void __user *argp = (void __user *)arg;
-	int r = -EINVAL;
+	int r = -ENOTTY;
 	/*
 	 * This union makes it completely explicit to gcc-3.x
 	 * that these two variables' stack usage should be