]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Fix disk image double-free on KVM panic
authorPekka Enberg <penberg@kernel.org>
Thu, 28 Apr 2011 18:36:35 +0000 (21:36 +0300)
committerPekka Enberg <penberg@kernel.org>
Thu, 28 Apr 2011 18:36:35 +0000 (21:36 +0300)
The kvm_cmd_run() calls disk_image__close() before exiting so we must not it in
kvm_cpu_thread() in the "panic_kvm" case.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/kvm-run.c

index 97a17dd2c9e249a6dd1b618d71413cc228895813..b21b4a295a7b6d500e4c6b8aeefddc7aa91c4f5d 100644 (file)
@@ -143,7 +143,7 @@ panic_kvm:
        if (current_kvm_cpu->kvm_run->exit_reason == KVM_EXIT_UNKNOWN)
                fprintf(stderr, "KVM exit code: 0x%Lu\n",
                        current_kvm_cpu->kvm_run->hw.hardware_exit_reason);
-       disk_image__close(kvm->disk_image);
+
        kvm_cpu__show_registers(current_kvm_cpu);
        kvm_cpu__show_code(current_kvm_cpu);
        kvm_cpu__show_page_tables(current_kvm_cpu);