Skip to contentSkip to conversation

ARM: KVM: fix KVM_CAP_ARM_SET_DEVICE_ADDR reporting

PATCH New Marc Zyngier 2 participants 2 messages Apr 3, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: KVM: fix KVM_CAP_ARM_SET_DEVICE_ADDR reporting

Commit 3401d54696f9 (KVM: ARM: Introduce KVM_ARM_SET_DEVICE_ADDR ioctl) added support for the KVM_CAP_ARM_SET_DEVICE_ADDR capability, but failed to add a break in the relevant case statement, returning the number of CPUs instead.

Luckilly enough, the CONFIG_NR_CPUS=0 patch hasn't been merged yet
(https://lkml.org/lkml/diff/2012/3/31/131/1), so the bug wasn't noticed.

Just give it a break!

---
 arch/arm/kvm/arm.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/kvm/arm.c +1 -0
index 6cc076e..d568e83 100644
@@ -198,6 +198,7 @@ int kvm_dev_ioctl_check_extension(long ext)
 		break;
 	case KVM_CAP_ARM_SET_DEVICE_ADDR:
 		r = 1;
+		break;
 	case KVM_CAP_NR_VCPUS:
 		r = num_online_cpus();
 		break;
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH 1/1 ARM: KVM: fix KVM_CAP_ARM_SET_DEVICE_ADDR reporting

Quoted 32 lines · Marc Zyngier

Commit 3401d54696f9 (KVM: ARM: Introduce KVM_ARM_SET_DEVICE_ADDR ioctl) added support for the KVM_CAP_ARM_SET_DEVICE_ADDR capability, but failed to add a break in the relevant case statement, returning the number of CPUs instead.

Luckilly enough, the CONFIG_NR_CPUS=0 patch hasn't been merged yet
(https://lkml.org/lkml/diff/2012/3/31/131/1), so the bug wasn't noticed.

Just give it a break!

---
 arch/arm/kvm/arm.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/kvm/arm.c +1 -0
index 6cc076e..d568e83 100644
@@ -198,6 +198,7 @@ int kvm_dev_ioctl_check_extension(long ext)
 		break;
 	case KVM_CAP_ARM_SET_DEVICE_ADDR:
 		r = 1;
+		break;
 	case KVM_CAP_NR_VCPUS:
 		r = num_online_cpus();
 		break;
Signature · 1 line
1.8.1.4

Whoops, nice catch. Thanks.

-Christoffer