Skip to content
  • Stefan Hajnoczi's avatar
    0a21ea32
    virtio-blk: avoid dataplane VirtIOBlockReq early free · 0a21ea32
    Stefan Hajnoczi authored
    
    
    VirtIOBlockReq is freed later by virtio_blk_free_request() in
    hw/block/virtio-blk.c.  Remove this extraneous g_slice_free().
    
    This patch fixes the following segfault:
    
      0x00005555556373af in virtio_blk_rw_complete (opaque=0x5555565ff5e0, ret=0) at hw/block/virtio-blk.c:99
      99          bdrv_acct_done(req->dev->bs, &req->acct);
      (gdb) print req
      $1 = (VirtIOBlockReq *) 0x5555565ff5e0
      (gdb) print req->dev
      $2 = (VirtIOBlock *) 0x0
      (gdb) bt
      #0  0x00005555556373af in virtio_blk_rw_complete (opaque=0x5555565ff5e0, ret=0) at hw/block/virtio-blk.c:99
      #1  0x0000555555840ebe in bdrv_co_em_bh (opaque=0x5555566152d0) at block.c:4675
      #2  0x000055555583de77 in aio_bh_poll (ctx=ctx@entry=0x5555563a8150) at async.c:81
      #3  0x000055555584b7a7 in aio_poll (ctx=0x5555563a8150, blocking=blocking@entry=true) at aio-posix.c:188
      #4  0x00005555556e520e in iothread_run (opaque=0x5555563a7fd8) at iothread.c:41
      #5  0x00007ffff42ba124 in start_thread () from /usr/lib/libpthread.so.0
      #6  0x00007ffff16d14bd in clone () from /usr/lib/libc.so.6
    
    Reported-by: default avatarMax Reitz <mreitz@redhat.com>
    Cc: Fam Zheng <famz@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Tested-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    0a21ea32
    virtio-blk: avoid dataplane VirtIOBlockReq early free
    Stefan Hajnoczi authored
    
    
    VirtIOBlockReq is freed later by virtio_blk_free_request() in
    hw/block/virtio-blk.c.  Remove this extraneous g_slice_free().
    
    This patch fixes the following segfault:
    
      0x00005555556373af in virtio_blk_rw_complete (opaque=0x5555565ff5e0, ret=0) at hw/block/virtio-blk.c:99
      99          bdrv_acct_done(req->dev->bs, &req->acct);
      (gdb) print req
      $1 = (VirtIOBlockReq *) 0x5555565ff5e0
      (gdb) print req->dev
      $2 = (VirtIOBlock *) 0x0
      (gdb) bt
      #0  0x00005555556373af in virtio_blk_rw_complete (opaque=0x5555565ff5e0, ret=0) at hw/block/virtio-blk.c:99
      #1  0x0000555555840ebe in bdrv_co_em_bh (opaque=0x5555566152d0) at block.c:4675
      #2  0x000055555583de77 in aio_bh_poll (ctx=ctx@entry=0x5555563a8150) at async.c:81
      #3  0x000055555584b7a7 in aio_poll (ctx=0x5555563a8150, blocking=blocking@entry=true) at aio-posix.c:188
      #4  0x00005555556e520e in iothread_run (opaque=0x5555563a7fd8) at iothread.c:41
      #5  0x00007ffff42ba124 in start_thread () from /usr/lib/libpthread.so.0
      #6  0x00007ffff16d14bd in clone () from /usr/lib/libc.so.6
    
    Reported-by: default avatarMax Reitz <mreitz@redhat.com>
    Cc: Fam Zheng <famz@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Tested-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading