qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d9c05e: test-uuid: fix leak


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] d9c05e: test-uuid: fix leak
Date: Mon, 14 Nov 2016 13:00:10 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d9c05e507f7a6647cd7b106c8784f1f15a0e4f5c
      
https://github.com/qemu/qemu/commit/d9c05e507f7a6647cd7b106c8784f1f15a0e4f5c
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M tests/test-uuid.c

  Log Message:
  -----------
  test-uuid: fix leak

ASAN spotted:
SUMMARY: AddressSanitizer: 74 byte(s) leaked in 2 allocation(s).

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>


  Commit: a1d4e38a8b01a6699355c31867d524f8d4cd480e
      
https://github.com/qemu/qemu/commit/a1d4e38a8b01a6699355c31867d524f8d4cd480e
  Author: Ashijeet Acharya <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block/nbd.c

  Log Message:
  -----------
  block/nbd: Fix the leaked visitor

This patch frees the leaked visitor in nbd_refresh_filename() and uses
visit_free() to fix it. The leak was introduced by the commit 491d6c7.

Signed-off-by: Ashijeet Acharya <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9a80832abff65044a18405f4eb22c94eba341ff6
      
https://github.com/qemu/qemu/commit/9a80832abff65044a18405f4eb22c94eba341ff6
  Author: Ashijeet Acharya <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block/ssh.c

  Log Message:
  -----------
  block/ssh: Code cleanup for unused parameter

This patch drops the unused parameter "BDRVSSHState" being passed into
the ssh_config() function and does code cleanup. The unused parameter
was introduced by the commit c322712.

Signed-off-by: Ashijeet Acharya <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 11d6fbe05fd67610a7735e5350e4299f93bf7655
      
https://github.com/qemu/qemu/commit/11d6fbe05fd67610a7735e5350e4299f93bf7655
  Author: Alberto Garcia <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M hmp.c

  Log Message:
  -----------
  hmp: Make block_stream set an explicit job ID

A job ID is always required in order to create a block job on a
non-root node. The default ID (obtained with bdrv_get_device_name())
is otherwise empty in this scenario and the job cannot be created.

The HMP block_stream command doesn't set a job ID and therefore it
doesn't allow streaming to intermediate nodes. One solution is to add
an extra parameter to set a job ID. The other solution is to simply
use the node name passed to block_stream as job ID. This won't work
if it's automatically generated (because it contains a '#') but is
otherwise simple enough for all other cases.

This way 'block_stream node3' will create a job with the ID 'node3'
and the good old 'block_stream virtio0' will keep the previous
behaviour and use 'virtio0' for the job ID.

Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 40332872fec584d2557ed2c3f48d55d15d95eddb
      
https://github.com/qemu/qemu/commit/40332872fec584d2557ed2c3f48d55d15d95eddb
  Author: Tomáš Golembiovský <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block/raw_bsd.c

  Log Message:
  -----------
  raw_bsd: move check to prevent overflow

When only offset is specified but no size and the offset is greater than
the real size of the containing device an overflow occurs when parsing
the options. This overflow is harmless because we do check for this
exact situation little bit later, but it leads to an error message with
weird values. It is better to do the check is sooner and prevent the
overflow.

Signed-off-by: Tomáš Golembiovský <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 80a15e3e2eed96926d886693663503985c9a98bb
      
https://github.com/qemu/qemu/commit/80a15e3e2eed96926d886693663503985c9a98bb
  Author: Tomáš Golembiovský <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block/raw_bsd.c

  Log Message:
  -----------
  raw_bsd: don't check size alignment when only offset is set

We make sure that the size is aligned to sector length to prevent any
round ups. Otherwise we could end up reading/writing data outside the
area specified by user. This is only needed when user supplies the size
option to avoid any surprises. It is not necessary when only offset is
set.

More over, the check made it difficult to use the offset option without
size option. The check puts unneeded restriction on the offset which had
to be aligned too. Because bdrv_getlength() returns aligned value having
unaligned offset would make the check fail.

Signed-off-by: Tomáš Golembiovský <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 9dd76f82d9a8d060c217d543304a350ef227e997
      
https://github.com/qemu/qemu/commit/9dd76f82d9a8d060c217d543304a350ef227e997
  Author: Alberto Garcia <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block/qcow2.h

  Log Message:
  -----------
  qcow2: Remove stale FIXME comment

It was from the time when none of the global functions had a qcow2_
prefix.

Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>


  Commit: 07555ba6f303d4be8af538c3a66cc46ccb2e5751
      
https://github.com/qemu/qemu/commit/07555ba6f303d4be8af538c3a66cc46ccb2e5751
  Author: Kevin Wolf <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block/nfs.c

  Log Message:
  -----------
  nfs: Fix memory leak in nfs_file_create()

The leak was introduced in commit 94d6a7a7.

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


  Commit: ceff5bd79cdf94c650902fe9a20d316dcbfa1cc9
      
https://github.com/qemu/qemu/commit/ceff5bd79cdf94c650902fe9a20d316dcbfa1cc9
  Author: Max Reitz <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Fix bdrv_iterate_format() sorting

bdrv_iterate_format() did not actually sort the formats by name but by
"pointer interpreted as string". That is probably not what we intended
to do, so fix it (by changing qsort_strcmp() so it matches the example
from qsort()'s manual page).

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: eb0df69f50bd64454bcb9457e875cd52f00dced8
      
https://github.com/qemu/qemu/commit/eb0df69f50bd64454bcb9457e875cd52f00dced8
  Author: Max Reitz <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Emit modules in bdrv_iterate_format()

Some block drivers may not be loaded yet, but qemu supports them
nonetheless. bdrv_iterate_format() should report them, too.

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: eaed090735ac0dbcaad6d39074da6607f2f81b8a
      
https://github.com/qemu/qemu/commit/eaed090735ac0dbcaad6d39074da6607f2f81b8a
  Author: Max Reitz <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M tests/qemu-iotests/162

  Log Message:
  -----------
  iotests: Skip test 162 if there is no SSH support

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 3bb8ef4b7aafe9de0b93a4d6ba2843b11acbefe4
      
https://github.com/qemu/qemu/commit/3bb8ef4b7aafe9de0b93a4d6ba2843b11acbefe4
  Author: Max Reitz <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.qemu

  Log Message:
  -----------
  iotests: Always use -machine accel=qtest

Currently, we only use -machine accel=qtest when qemu is invoked through
the common.qemu functions. However, we always want to use it, so move it
from common.qemu directly into QEMU_OPTIONS.

Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: 4e6d13c9839915ba90d7d561c54cc10416c8c4bd
      
https://github.com/qemu/qemu/commit/4e6d13c9839915ba90d7d561c54cc10416c8c4bd
  Author: Fam Zheng <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block/raw-posix.c

  Log Message:
  -----------
  raw-posix: Rename 'raw_s' to 'rs'

It is too confusing because it sounds like a BDRVRawState variable.

Suggested-by: Max Reitz <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>


  Commit: ff569b9424d1e6c7144dbe7d76ea50f5c11d4a1c
      
https://github.com/qemu/qemu/commit/ff569b9424d1e6c7144dbe7d76ea50f5c11d4a1c
  Author: Kevin Wolf <address@hidden>
  Date:   2016-11-11 (Fri, 11 Nov 2016)

  Changed paths:
    M block.c
    M block/raw-posix.c
    M tests/qemu-iotests/162
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.qemu

  Log Message:
  -----------
  Merge remote-tracking branch 'mreitz/tags/pull-block-2016-11-11' into 
queue-block

Block patches for qemu 2.8

# gpg: Signature made Fri Nov 11 15:56:59 2016 CET
# gpg:                using RSA key 0xF407DB0061D5CF40
# gpg: Good signature from "Max Reitz <address@hidden>"
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* mreitz/tags/pull-block-2016-11-11:
  raw-posix: Rename 'raw_s' to 'rs'
  iotests: Always use -machine accel=qtest
  iotests: Skip test 162 if there is no SSH support
  block: Emit modules in bdrv_iterate_format()
  block: Fix bdrv_iterate_format() sorting

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


  Commit: 736986fad31cd0f25cec89138a566f6938935a29
      
https://github.com/qemu/qemu/commit/736986fad31cd0f25cec89138a566f6938935a29
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M tests/test-uuid.c

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

* remotes/fam/tags/for-upstream:
  test-uuid: fix leak

Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: a77beb0fcbf419aa1e8e32b7df3609664f74c928
      
https://github.com/qemu/qemu/commit/a77beb0fcbf419aa1e8e32b7df3609664f74c928
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M block.c
    M block/nbd.c
    M block/nfs.c
    M block/qcow2.h
    M block/raw-posix.c
    M block/raw_bsd.c
    M block/ssh.c
    M hmp.c
    M tests/qemu-iotests/162
    M tests/qemu-iotests/common
    M tests/qemu-iotests/common.qemu

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

Block layer patches for 2.8.0-rc0

# gpg: Signature made Fri 11 Nov 2016 03:46:12 PM GMT
# 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

* kwolf/tags/for-upstream:
  raw-posix: Rename 'raw_s' to 'rs'
  iotests: Always use -machine accel=qtest
  iotests: Skip test 162 if there is no SSH support
  block: Emit modules in bdrv_iterate_format()
  block: Fix bdrv_iterate_format() sorting
  nfs: Fix memory leak in nfs_file_create()
  qcow2: Remove stale FIXME comment
  raw_bsd: don't check size alignment when only offset is set
  raw_bsd: move check to prevent overflow
  hmp: Make block_stream set an explicit job ID
  block/ssh: Code cleanup for unused parameter
  block/nbd: Fix the leaked visitor

Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: e7bd708ec85e40fd51569bb90c52d6613ffd8f45
      
https://github.com/qemu/qemu/commit/e7bd708ec85e40fd51569bb90c52d6613ffd8f45
  Author: John Snow <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M hw/ide/atapi.c

  Log Message:
  -----------
  atapi: classify read_cd as conditionally returning data

For the purposes of byte_count_limit verification, add a new flag that
identifies read_cd as sometimes returning data, then check the BCL in
its command handler after we know that it will indeed return data.

Reported-by: Hervé Poussineau <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>


  Commit: 53c05e6c20509adcff40fe1c7a02210354fe53f7
      
https://github.com/qemu/qemu/commit/53c05e6c20509adcff40fe1c7a02210354fe53f7
  Author: John Snow <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M tests/ahci-test.c

  Log Message:
  -----------
  ahci-test: Create smaller test ISO images

These can simply be the size of the number of sectors we're reading,
plus one for a buffer. We don't need them to be any larger.

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


  Commit: ebde93bf9a13f2e0a853eac8fb4f33c9ecd74baf
      
https://github.com/qemu/qemu/commit/ebde93bf9a13f2e0a853eac8fb4f33c9ecd74baf
  Author: John Snow <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M tests/ahci-test.c
    M tests/libqos/ahci.c
    M tests/libqos/ahci.h

  Log Message:
  -----------
  ahci-test: test atapi read_cd with bcl, nb_sectors = 0

Commit 9ef2e93f introduced the concept of tagging ATAPI commands as
NONDATA, but this introduced a regression for certain commands better
described as CONDDATA. read_cd is such a command that both requires
a non-zero BCL if a transfer size is set, but is perfectly content to
accept a zero BCL if the transfer size is 0.

This test adds a regression test for the case where BCL and nb_sectors
are both 0.

Flesh out the CDROM tests by:

(1) Allowing the test to specify a BCL
(2) Allowing the buffer comparison test to compare a 0-size buffer
(3) Fix the BCL specification in libqos (It is LE, not BE)
(4) Add a nice human-readable message for future SCSI command additions

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Message-id: address@hidden
[Line length edit --js]
Signed-off-by: John Snow <address@hidden>


  Commit: c47ee043dc2cc85da710e87524144a720598c096
      
https://github.com/qemu/qemu/commit/c47ee043dc2cc85da710e87524144a720598c096
  Author: John Snow <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block-backend: Always notify on blk_eject

blk_eject is only used by scsi-disk and atapi, and in both cases we
only attempt to invoke blk_eject if we have a bona-fide change in
tray state.

The "issue" here is that the tray state does not generate a QMP event
unless there is a medium/BDS attached to the device, so if libvirt et al
are waiting for a tray event to occur from an empty-but-closed drive,
software opening that drive will not emit an event and libvirt will
wait forever.

Change this by modifying blk_eject to always emit an event, instead of
conditionally on a "real" backend eject.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1373264

Reported-by: Peter Krempa <address@hidden>
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>


  Commit: 7ffe3124edd4cfb68870f62263cd9830b68a7a46
      
https://github.com/qemu/qemu/commit/7ffe3124edd4cfb68870f62263cd9830b68a7a46
  Author: John Snow <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M tests/libqtest.c
    M tests/libqtest.h

  Log Message:
  -----------
  libqtest: add qmp_eventwait_ref

Wait for an event, but return a copy so we can investigate parameters.

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


  Commit: f697b0edea426da261bff7541a66f36266d8edb0
      
https://github.com/qemu/qemu/commit/f697b0edea426da261bff7541a66f36266d8edb0
  Author: John Snow <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M tests/libqos/ahci.c
    M tests/libqos/ahci.h

  Log Message:
  -----------
  libqos/ahci: Support expected errors

Sometimes we know we'll get back an error, so let's have the
test framework understand that.

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


  Commit: 48cde0913203079036f2785b6bb274873a1a1db2
      
https://github.com/qemu/qemu/commit/48cde0913203079036f2785b6bb274873a1a1db2
  Author: John Snow <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M tests/libqos/ahci.c
    M tests/libqos/ahci.h

  Log Message:
  -----------
  libqos/ahci: Add ATAPI tray macros

(1) Add START_STOP_UNIT command to ahci-test suite
(2) Add eject/start macro commands; this is not a data transfer
    command so it is not well-served by the existing generic pipeline.

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


  Commit: e0a4cb2c7da23c2f0e6364214de5d84f35ce4d5d
      
https://github.com/qemu/qemu/commit/e0a4cb2c7da23c2f0e6364214de5d84f35ce4d5d
  Author: John Snow <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M tests/libqos/ahci.c
    M tests/libqos/ahci.h

  Log Message:
  -----------
  libqos/ahci: Add get_sense and test_ready

Required for tray tests once a medium may have changed.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Message-id: address@hidden
[Line length edit --js]
Signed-off-by: John Snow <address@hidden>


  Commit: 22381d4180fa71614ad195b54fe81e0ffb77b01e
      
https://github.com/qemu/qemu/commit/22381d4180fa71614ad195b54fe81e0ffb77b01e
  Author: John Snow <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M tests/ahci-test.c

  Log Message:
  -----------
  ahci-test: add QMP tray test for ATAPI

Test QMP events for a CDROM device with or without a media inserted,
including both guest-initiated and hw-initiated eject/load requests.

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


  Commit: 682df581c65ed2c1b9e77093e332214ecaa1ee93
      
https://github.com/qemu/qemu/commit/682df581c65ed2c1b9e77093e332214ecaa1ee93
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2016-11-14 (Mon, 14 Nov 2016)

  Changed paths:
    M block/block-backend.c
    M hw/ide/atapi.c
    M tests/ahci-test.c
    M tests/libqos/ahci.c
    M tests/libqos/ahci.h
    M tests/libqtest.c
    M tests/libqtest.h

  Log Message:
  -----------
  Merge remote-tracking branch 'jsnow/tags/ide-pull-request' into staging

# gpg: Signature made Mon 14 Nov 2016 04:16:48 PM GMT
# gpg:                using RSA key 0x7DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <address@hidden>"
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* jsnow/tags/ide-pull-request:
  ahci-test: add QMP tray test for ATAPI
  libqos/ahci: Add get_sense and test_ready
  libqos/ahci: Add ATAPI tray macros
  libqos/ahci: Support expected errors
  libqtest: add qmp_eventwait_ref
  block-backend: Always notify on blk_eject
  ahci-test: test atapi read_cd with bcl, nb_sectors = 0
  ahci-test: Create smaller test ISO images
  atapi: classify read_cd as conditionally returning data

Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


Compare: https://github.com/qemu/qemu/compare/83c83f9a5266...682df581c65e

reply via email to

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