qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] b1e1fa: commit: Add NULL check for overlay_bs


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] b1e1fa: commit: Add NULL check for overlay_bs
Date: Wed, 19 Jul 2017 04:28:23 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b1e1fa0c3afc7f671fbc24645bdf67949a5657e5
      
https://github.com/qemu/qemu/commit/b1e1fa0c3afc7f671fbc24645bdf67949a5657e5
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  commit: Add NULL check for overlay_bs

I can't see how overlay_bs could become NULL with the current code, but
other code in this function already checks it and we can make Coverity
happy with this check, so let's add it.

Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: dbe824cc57fbc93dc7ee53287e06c101b20e078b
      
https://github.com/qemu/qemu/commit/dbe824cc57fbc93dc7ee53287e06c101b20e078b
  Author: Manos Pitsidianakis <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/throttle-groups.c
    M fsdev/qemu-fsdev-throttle.c
    M include/qemu/throttle.h
    M tests/test-throttle.c
    M util/throttle.c

  Log Message:
  -----------
  block: add clock_type field to ThrottleGroup

Clock type in throttling is currently inferred by the ThrottleTimer's
clock type even though it is a per-ThrottleGroup property; it doesn't
make sense to have different clock types in the same group. Moving this
to a field in ThrottleGroup can simplify some of the throttle functions.

Signed-off-by: Manos Pitsidianakis <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 27e4cf13030ca5d12bbad12f38a27d35378a5894
      
https://github.com/qemu/qemu/commit/27e4cf13030ca5d12bbad12f38a27d35378a5894
  Author: Manos Pitsidianakis <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/throttle-groups.c
    M fsdev/qemu-fsdev-throttle.c
    M include/qemu/throttle.h
    M tests/test-throttle.c
    M util/throttle.c

  Log Message:
  -----------
  block: remove timer canceling in throttle_config()

throttle_config() cancels the timers of the calling BlockBackend. This
doesn't make sense because other BlockBackends in the group remain
untouched. There's no need to cancel the timers in the one specific
BlockBackend so let's not do that. Throttled requests will run as
scheduled and future requests will follow the new configuration. This
also allows a throttle group's configuration to be changed even when it
has no members.

Signed-off-by: Manos Pitsidianakis <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9877860e7bd1e26ee70ab9bb5ebc34c92bf23bf5
      
https://github.com/qemu/qemu/commit/9877860e7bd1e26ee70ab9bb5ebc34c92bf23bf5
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  block/vmdk: Report failures in vmdk_read_cid()

The function vmdk_read_cid() can fail if the read on the underlying
block device fails, or if there's a format error in the VMDK file.
However its API doesn't provide a mechanism to report these errors,
and in some cases we were returning a CID of 0 and in some cases a
CID of 0xffffffff, either of which might potentially be valid values.

Change the function to return 0 on success or a negative errno, and
return the CID via a uint32_t* argument. Update the callsites to
handle and propagate the error appropriately.

This fixes in passing a Coverity-spotted issue (CID 1350038) where
we weren't checking the return value from sscanf().

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: cfc87e00c22ab4ea0262c9771c803ed03d754001
      
https://github.com/qemu/qemu/commit/cfc87e00c22ab4ea0262c9771c803ed03d754001
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/vpc.c

  Log Message:
  -----------
  block/vpc.c: Handle write failures in get_image_offset()

Coverity (CID 1355236) points out that get_image_offset() doesn't check that
it actually succeeded in writing the updated block bitmap to the file.
Check the error return from bdrv_pwrite_sync() and propagate an error
response back up to the function which calls get_image_offset() for
a write so that it can return the error to its caller.

get_sector_offset() is only used for reads, but we move it to the
same API for consistency.

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


  Commit: 77beef8365ef797c95e49d87f07ed5d60d583594
      
https://github.com/qemu/qemu/commit/77beef8365ef797c95e49d87f07ed5d60d583594
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/block-backend.c
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block: Make blk_get_attached_dev_id() public

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


  Commit: 46eade7be83c110659ea9a6883fbd898d455ec06
      
https://github.com/qemu/qemu/commit/46eade7be83c110659ea9a6883fbd898d455ec06
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/qapi.c
    M hmp.c
    M qapi/block-core.json
    M tests/qemu-iotests/067.out

  Log Message:
  -----------
  block/qapi: Add qdev device name to query-block

With -blockdev/-device, users can indirectly create anonymous
BlockBackends, while the state of such backends is still of interest. As
a preparation for making such BBs visible in query-block, make sure that
they can be identified even without a name by adding the ID/QOM path of
their qdev device to BlockInfo.

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


  Commit: a429b9b5f44fb126b3a6ff971027470254401487
      
https://github.com/qemu/qemu/commit/a429b9b5f44fb126b3a6ff971027470254401487
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/block-backend.c
    M include/sysemu/block-backend.h

  Log Message:
  -----------
  block: Make blk_all_next() public

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


  Commit: d5b68844e6f7c13d30b46cc92ba468e5f92119a6
      
https://github.com/qemu/qemu/commit/d5b68844e6f7c13d30b46cc92ba468e5f92119a6
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/qapi.c

  Log Message:
  -----------
  block/qapi: Use blk_all_next() for query-block

This patch replaces the blk_next() loop in query-block by a
blk_all_next() one so that we also get access to BlockBackends that
aren't owned by the monitor. For now, the next thing we do is check
whether each BB has a name, so there is no semantic difference.

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


  Commit: ec18b0a93a0b8f6f9a72bf2461dc7a0930391bfa
      
https://github.com/qemu/qemu/commit/ec18b0a93a0b8f6f9a72bf2461dc7a0930391bfa
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/qapi.c
    M hmp.c

  Log Message:
  -----------
  block: List anonymous device BBs in query-block

Instead of listing only monitor-owned BlockBackends in query-block, also
add those anonymous BlockBackends that are owned by a qdev device and as
such under the control of the user.

This allows using query-block to inspect BlockBackends for the modern
configuration syntax with -blockdev and -device.

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


  Commit: 947231ad3b479de82d8f5ec185e2d00f3c96edcd
      
https://github.com/qemu/qemu/commit/947231ad3b479de82d8f5ec185e2d00f3c96edcd
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M hw/ide/qdev.c

  Log Message:
  -----------
  ide: bdrv_attach_dev() for empty CD-ROM

If no drive=... option is passed (for an empty drive), we don't only
lack the BlockBackend normally created by parse_drive(), but we also
need to manually call blk_attach_dev().

IDE does not support hot unplug, but if it did, qdev would take care to
call the matching blk_detach_dev() on unplug.

This fixes at least the bug that such devices didn't show up in
query-block, and probably some more problems.

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


  Commit: 83b4fe0ed5c27dfe181c7c746456ba33e4f7ef2b
      
https://github.com/qemu/qemu/commit/83b4fe0ed5c27dfe181c7c746456ba33e4f7ef2b
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: bdrv_attach_dev() for empty CD-ROM

If no drive=... option is passed (for an empty drive), we don't only
lack the BlockBackend normally created by parse_drive(), but we also
need to manually call blk_attach_dev().

This fixes at least a segfault when unplugging such devices, the bug
that they didn't show up in query-block, and probably some more
problems.

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


  Commit: e1824e585f54426bd6b035221bf85f90893dc653
      
https://github.com/qemu/qemu/commit/e1824e585f54426bd6b035221bf85f90893dc653
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

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

  Log Message:
  -----------
  qemu-iotests: Test 'info block'

This test makes sure that all block devices show up on 'info block',
with all of the expected information, in different configurations.

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


  Commit: 208c38e4e4a5e808b5720329f3633f4ab2bc5026
      
https://github.com/qemu/qemu/commit/208c38e4e4a5e808b5720329f3633f4ab2bc5026
  Author: Kevin Wolf <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

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

  Log Message:
  -----------
  qemu-iotests: Test unplug of -device without drive

This caused an assertion failure until recently because the BlockBackend
would be detached on unplug, but was in fact never attached in the first
place. Add a regression test.

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


  Commit: 8c4517fd6e52de87c2e06dbb392a87eecc79d9e2
      
https://github.com/qemu/qemu/commit/8c4517fd6e52de87c2e06dbb392a87eecc79d9e2
  Author: Hervé Poussineau <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: add constants for special values of name[0]

Signed-off-by: Hervé Poussineau <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 63d261cb0d87bef033c447654279c62f586af1da
      
https://github.com/qemu/qemu/commit/63d261cb0d87bef033c447654279c62f586af1da
  Author: Hervé Poussineau <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: add a constant for bootsector name

Also add links to related compatibility problems.

Signed-off-by: Hervé Poussineau <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: e03da26b71d6bc2a7013eb75d1a7213c1392d159
      
https://github.com/qemu/qemu/commit/e03da26b71d6bc2a7013eb75d1a7213c1392d159
  Author: Hervé Poussineau <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: correctly parse non-ASCII short and long file names

Write support works again when image contains non-ASCII names. It is either the
case when user created a non-ASCII filename, or when initial directory contained
a non-ASCII filename (since 0c36111f57ec2188f679e7fa810291b7386bdca1)

Signed-off-by: Hervé Poussineau <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: f80256b7eebfbe20683b3a2b2720ad9991313761
      
https://github.com/qemu/qemu/commit/f80256b7eebfbe20683b3a2b2720ad9991313761
  Author: Hervé Poussineau <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: initialize memory after allocating it

This prevents some host to guest memory content leaks.

Fixes: https://bugs.launchpad.net/qemu/+bug/1599539

Signed-off-by: Hervé Poussineau <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 7c8730d45f63b76588da5ea0d4eff73a0bcae188
      
https://github.com/qemu/qemu/commit/7c8730d45f63b76588da5ea0d4eff73a0bcae188
  Author: Max Reitz <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  block/vvfat: Fix compiler warning with gcc 7

gcc 7 complains that the sprintf() might write a null byte beyond the
end of the tail buffer.  That is wrong, but we can silence it by making
i unsigned (it can never be negative anyway, see the if condition right
before).  For some reason, this allows gcc to suddenly accurately
calculate the range of i so we can give the tail[] array the exact size
it needs to have (which is 8 bytes) without gcc complaining.

In addition, let us convert the sprintf() to snprintf(), because that is
always nicer, and add an assertion about the range of the return value
afterwards so we can see that "8 - len" will never be negative and thus
"entry->name + MIN(j, 8 - len)" will never be out of bounds.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 2a32c6e82ed24d837ce7af346ffc93113f0164b5
      
https://github.com/qemu/qemu/commit/2a32c6e82ed24d837ce7af346ffc93113f0164b5
  Author: John Snow <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: move BDRV_O_NO_BACKING option forward

For both external_snapshot_prepare and qmp_drive_mirror, we eventually
append the option BDRV_O_NO_BACKING. However, we generally do so after
we create the image.

To accommodate image creation wanting to verify that a backing file
exists or not, add this option prior to create to override checking
the existence of the backing file. This prevents QEMU from trying to
re-open a backing file that's already in use (thanks to qcow2 locking).

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


  Commit: 6e6e55f5c2e5b520d6506c2716287ba3b5d1bbc8
      
https://github.com/qemu/qemu/commit/6e6e55f5c2e5b520d6506c2716287ba3b5d1bbc8
  Author: John Snow <address@hidden>
  Date:   2017-07-18 (Tue, 18 Jul 2017)

  Changed paths:
    M block.c
    M qemu-img-cmds.hx
    M qemu-img.c
    M qemu-img.texi
    M tests/qemu-iotests/082
    M tests/qemu-iotests/082.out
    M tests/qemu-iotests/085
    M tests/qemu-iotests/111.out
    M tests/qemu-iotests/139
    M tests/qemu-iotests/156
    M tests/qemu-iotests/158
    M tests/qemu-iotests/189

  Log Message:
  -----------
  qemu-img: Check for backing image if specified during create

Or, rather, force the open of a backing image if one was specified
for creation. Using a similar -unsafe option as rebase, allow qemu-img
to ignore the backing file validation if possible.

It may not always be possible, as in the existing case when a filesize
for the new image was not specified.

This is accomplished by shifting around the conditionals in
bdrv_img_create, such that a backing file is always opened unless we
provide BDRV_O_NO_BACKING. qemu-img is adjusted to pass this new flag
when -u is provided to create.

Sorry for the heinous looking diffstat, but it's mostly whitespace.

Inspired by: https://bugzilla.redhat.com/show_bug.cgi?id=1213786

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


  Commit: f1a46e888515c6b49f3d43f938a9c17acac831f5
      
https://github.com/qemu/qemu/commit/f1a46e888515c6b49f3d43f938a9c17acac831f5
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-19 (Wed, 19 Jul 2017)

  Changed paths:
    M block.c
    M block/block-backend.c
    M block/commit.c
    M block/qapi.c
    M block/throttle-groups.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M blockdev.c
    M fsdev/qemu-fsdev-throttle.c
    M hmp.c
    M hw/ide/qdev.c
    M hw/scsi/scsi-disk.c
    M include/qemu/throttle.h
    M include/sysemu/block-backend.h
    M qapi/block-core.json
    M qemu-img-cmds.hx
    M qemu-img.c
    M qemu-img.texi
    M tests/qemu-iotests/067
    M tests/qemu-iotests/067.out
    M tests/qemu-iotests/082
    M tests/qemu-iotests/082.out
    M tests/qemu-iotests/085
    M tests/qemu-iotests/111.out
    M tests/qemu-iotests/139
    M tests/qemu-iotests/156
    M tests/qemu-iotests/158
    A tests/qemu-iotests/186
    A tests/qemu-iotests/186.out
    M tests/qemu-iotests/189
    M tests/qemu-iotests/group
    M tests/test-throttle.c
    M util/throttle.c

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

Block layer patches

# gpg: Signature made Tue 18 Jul 2017 14:29:59 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: (21 commits)
  qemu-img: Check for backing image if specified during create
  blockdev: move BDRV_O_NO_BACKING option forward
  block/vvfat: Fix compiler warning with gcc 7
  vvfat: initialize memory after allocating it
  vvfat: correctly parse non-ASCII short and long file names
  vvfat: add a constant for bootsector name
  vvfat: add constants for special values of name[0]
  qemu-iotests: Test unplug of -device without drive
  qemu-iotests: Test 'info block'
  scsi-disk: bdrv_attach_dev() for empty CD-ROM
  ide: bdrv_attach_dev() for empty CD-ROM
  block: List anonymous device BBs in query-block
  block/qapi: Use blk_all_next() for query-block
  block: Make blk_all_next() public
  block/qapi: Add qdev device name to query-block
  block: Make blk_get_attached_dev_id() public
  block/vpc.c: Handle write failures in get_image_offset()
  block/vmdk: Report failures in vmdk_read_cid()
  block: remove timer canceling in throttle_config()
  block: add clock_type field to ThrottleGroup
  ...

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


Compare: https://github.com/qemu/qemu/compare/63cb55783c5e...f1a46e888515

reply via email to

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