1. 28 6月, 2012 2 次提交
    • A
      qtest: fix infinite loop when QEMU aborts abruptly · 039380a8
      Anthony Liguori 提交于
      From Markus:
      
      Makes "make check" hang:
      
          QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test
          TEST: tests/crash-test... (pid=972)
          qemu-system-x86_64: Device needs media, but drive is empty
      [Nothing happens, wait a while, then hit ^C]
          make: *** [check-qtest-x86_64] Interrupt
      
      This was due to the fact that we weren't checked for errors when
      reading from the QMP socket.  This patch adds appropriate error
      checking.
      Reported-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      039380a8
    • A
      qdev: fix use-after-free in the error path of qdev_init_nofail · 7de3abe5
      Anthony Liguori 提交于
      From Markus:
      
      Before:
      
          $ qemu-system-x86_64 -display none -drive if=ide
          qemu-system-x86_64: Device needs media, but drive is empty
          qemu-system-x86_64: Initialization of device ide-hd failed
          [Exit 1 ]
      
      After:
      
          $ qemu-system-x86_64 -display none -drive if=ide
          qemu-system-x86_64: Device needs media, but drive is empty
          Segmentation fault (core dumped)
          [Exit 139 (SIGSEGV)]
      
      This error always existed as qdev_init() frees the object.  But QOM
      goes a bit further and purposefully sets the class pointer to NULL to
      help find use-after-free.  It worked :-)
      
      Cc: Andreas Faerber <afaerber@suse.de>
      Reported-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      7de3abe5
  2. 27 6月, 2012 9 次提交
  3. 25 6月, 2012 2 次提交
  4. 24 6月, 2012 27 次提交