1. 23 8月, 2012 7 次提交
  2. 22 8月, 2012 26 次提交
  3. 21 8月, 2012 1 次提交
  4. 20 8月, 2012 6 次提交
    • S
      qapi: Fix memory leak · e36c8766
      Stefan Weil 提交于
      valgrind report:
      
      ==24534== 232 bytes in 2 blocks are definitely lost in loss record 1,245 of 1,601
      ==24534==    at 0x4824F20: malloc (vg_replace_malloc.c:236)
      ==24534==    by 0x293C88: malloc_and_trace (vl.c:2281)
      ==24534==    by 0x489AD99: ??? (in /lib/libglib-2.0.so.0.2400.1)
      ==24534==    by 0x489B23B: g_malloc0 (in /lib/libglib-2.0.so.0.2400.1)
      ==24534==    by 0x2B4EFC: opts_visitor_new (opts-visitor.c:376)
      ==24534==    by 0x29DEA5: net_client_init (net.c:708)
      ==24534==    by 0x29E6C7: net_init_client (net.c:966)
      ==24534==    by 0x2C2179: qemu_opts_foreach (qemu-option.c:1114)
      ==24534==    by 0x29E85B: net_init_clients (net.c:1008)
      ==24534==    by 0x296F40: main (vl.c:3463)
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      e36c8766
    • P
      virtio-scsi: add backwards-compatibility properties for 1.1 and earlier machines · 07a5298c
      Paolo Bonzini 提交于
      Hotplug and parameter change are new in 1.2, disable them via compat
      properties for pc-1.1 and earlier.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      07a5298c
    • P
      iscsi: fix races between task completion and abort · 1bd075f2
      Paolo Bonzini 提交于
      This patch fixes two main issues with block/iscsi.c:
      
      1) iscsi_task_mgmt_abort_task_async calls iscsi_scsi_task_cancel which
      was also directly called in iscsi_aio_cancel
      
      2) a race between task completion and task abortion could happen cause
      the scsi_free_scsi_task were done before iscsi_schedule_bh has finished.
      To fix this, all the freeing of IscsiTasks and releasing of the AIOCBs
      is centralized in iscsi_bh_cb, independent of whether the SCSI command
      has completed or was cancelled.
      
      3) iscsi_aio_cancel was not synchronously waiting for the end of the
      command.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1bd075f2
    • P
      iscsi: simplify iscsi_schedule_bh · cfb3f506
      Paolo Bonzini 提交于
      It is always used with the same callback, remove the argument.  And
      its return value is never used, assume allocation succeeds.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      cfb3f506
    • P
      iscsi: move iscsi_schedule_bh and iscsi_readv_writev_bh_cb · 27cbd828
      Paolo Bonzini 提交于
      Put these functions at the beginning, to avoid forward references
      in the next patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      27cbd828
    • P
      Revert "iscsi: Fix NULL dereferences / races between task completion and abort" · b2090919
      Paolo Bonzini 提交于
      This reverts commit 64e69e80.  The commit
      returned immediately from iscsi_aio_cancel, risking corruption in case the
      following happens:
      
          guest                  qemu                 target
        =========================================================================
          send write 1 -------->
                                 send write 1 -------->
          cancel write 1 ------>
                                 cancel write 1 ------>
             <------------------ cancellation processed
          send write 2 -------->
                                 send write 2 -------->
                                     <---------------- completed write 2
             <------------------ completed write 2
                                     <---------------- completed write 1
                                     <---------------- cancellation not done
      
      Here, the guest would see write 2 superseding write 1, when in fact the
      outcome could have been the opposite.  The right behavior is to return
      only after the target says whether the cancellation was done or not, and
      it will be implemented by the next three patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b2090919