]> git.proxmox.com Git - qemu.git/commit
Revert "iscsi: Fix NULL dereferences / races between task completion and abort"
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 18 Aug 2012 22:12:39 +0000 (00:12 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 20 Aug 2012 13:50:45 +0000 (15:50 +0200)
commitb20909195745c34a819aed14ae996b60ab0f591f
tree830f04a59eae29078009cfb513b52caa1f03f23b
parente89001f72edde37fb36fa7c964daa1bbeb2eca26
Revert "iscsi: Fix NULL dereferences / races between task completion and abort"

This reverts commit 64e69e80920d82df3fa679bc41b13770d2f99360.  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: Paolo Bonzini <pbonzini@redhat.com>
block/iscsi.c