qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 93c265: block: Fix anonymous BBs in blk_root_


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 93c265: block: Fix anonymous BBs in blk_root_inactivate()
Date: Mon, 12 Jun 2017 03:22:45 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 93c26503e01808bfb8cea3c25eae5be63147380e
      
https://github.com/qemu/qemu/commit/93c26503e01808bfb8cea3c25eae5be63147380e
  Author: Kevin Wolf <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block: Fix anonymous BBs in blk_root_inactivate()

blk->name isn't an array, but a pointer that can be NULL. Checking for
an anonymous BB must involve a NULL check first, otherwise we get
crashes.

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>


  Commit: f07fa4cbf0b16426dc5a03d4e13943143eaeb1ce
      
https://github.com/qemu/qemu/commit/f07fa4cbf0b16426dc5a03d4e13943143eaeb1ce
  Author: Kevin Wolf <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Inactivate images after .save_live_complete_precopy()

Block migration may still access the image during its
.save_live_complete_precopy() implementation, so we should only
inactivate the image afterwards.

Another reason for the change is that inactivating an image fails when
there is still a non-device BlockBackend using it, which includes the
BBs used by block migration. We want to give block migration a chance to
release the BBs before trying to inactivate the image (this will be done
in another patch).

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>


  Commit: 362fdf170cb19301f70bc004e85dc82f83901afc
      
https://github.com/qemu/qemu/commit/362fdf170cb19301f70bc004e85dc82f83901afc
  Author: Kevin Wolf <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M migration/block.c

  Log Message:
  -----------
  migration/block: Clean up BBs in block_save_complete()

We need to release any block migrations BlockBackends on the source
before successfully completing the migration because otherwise
inactivating the images will fail (inactivation only tolerates device
BBs).

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>


  Commit: 49695eeb7485f1c45c288e741ae6b939c7bfb2a6
      
https://github.com/qemu/qemu/commit/49695eeb7485f1c45c288e741ae6b939c7bfb2a6
  Author: Kevin Wolf <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    A tests/qemu-iotests/183
    A tests/qemu-iotests/183.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  qemu-iotests: Block migration test

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 19ebd13ed45ad5d5f277f5914d55b83f13eb09eb
      
https://github.com/qemu/qemu/commit/19ebd13ed45ad5d5f277f5914d55b83f13eb09eb
  Author: Kevin Wolf <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  commit: Fix use after free in completion

The final bdrv_set_backing_hd() could be working on already freed nodes
because the commit job drops its references (through BlockBackends) to
both overlay_bs and top already a bit earlier.

One way to trigger the bug is hot unplugging a disk for which
blockdev_mark_auto_del() cancels the block job.

Fix this by taking BDS-level references while we're still using the
nodes.

Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: John Snow <address@hidden>


  Commit: c3971b883a596abc6af45f53d2f43fb2f59ccd3b
      
https://github.com/qemu/qemu/commit/c3971b883a596abc6af45f53d2f43fb2f59ccd3b
  Author: Kevin Wolf <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M tests/qemu-iotests/040
    M tests/qemu-iotests/040.out

  Log Message:
  -----------
  qemu-iotests: Test automatic commit job cancel on hot unplug

Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: John Snow <address@hidden>


  Commit: 272545cf215f183ecb84c1d0fca3fd38db806977
      
https://github.com/qemu/qemu/commit/272545cf215f183ecb84c1d0fca3fd38db806977
  Author: Peter Maydell <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M block/qcow.c

  Log Message:
  -----------
  block/qcow.c: Fix memory leak in qcow_create()

Coverity points out that the code path in qcow_create() for
the magic "fat:" backing file name leaks the memory used to
store the filename (CID 1307771). Free the memory before
we overwrite the pointer.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 719fc28c80a22ab9f1533d775bae09c14442bbbe
      
https://github.com/qemu/qemu/commit/719fc28c80a22ab9f1533d775bae09c14442bbbe
  Author: Jeff Cody <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  block: fix external snapshot abort permission error

In external_snapshot_abort(), we try to undo what was done in
external_snapshot_prepare() calling bdrv_replace_node() to swap the
nodes back.  However, we receive a permissions error as writers are
blocked on the old node, which is now the new node backing file.

An easy fix (initially suggested by Kevin Wolf) is to call
bdrv_set_backing_hd() on the new node, to set the backing node to NULL.

Signed-off-by: Jeff Cody <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 475df9d809b1f3a7ebe8b15abd208216591f0143
      
https://github.com/qemu/qemu/commit/475df9d809b1f3a7ebe8b15abd208216591f0143
  Author: Peter Maydell <address@hidden>
  Date:   2017-06-12 (Mon, 12 Jun 2017)

  Changed paths:
    M block/block-backend.c
    M block/commit.c
    M block/qcow.c
    M blockdev.c
    M migration/block.c
    M migration/migration.c
    M tests/qemu-iotests/040
    M tests/qemu-iotests/040.out
    A tests/qemu-iotests/183
    A tests/qemu-iotests/183.out
    M tests/qemu-iotests/group

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches

# gpg: Signature made Fri 09 Jun 2017 12:47:31 BST
# gpg:                using RSA key 0x7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  block: fix external snapshot abort permission error
  block/qcow.c: Fix memory leak in qcow_create()
  qemu-iotests: Test automatic commit job cancel on hot unplug
  commit: Fix use after free in completion
  qemu-iotests: Block migration test
  migration/block: Clean up BBs in block_save_complete()
  migration: Inactivate images after .save_live_complete_precopy()
  block: Fix anonymous BBs in blk_root_inactivate()

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/bbfa326fc802...475df9d809b1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]