qemu/block
Jeff Cody 113fe792fd block/nfs: fix mutex assertion in nfs_file_close()
Commit c096358e74 introduced assertion
checks for when qemu_mutex() functions are called without the
corresponding qemu_mutex_init() having initialized the mutex.

This uncovered a latent bug in qemu's nfs driver - in
nfs_client_close(), the NFSClient structure is overwritten with zeros,
prior to the mutex being destroyed.

Go ahead and destroy the mutex in nfs_client_close(), and change where
we call qemu_mutex_init() so that it is correctly balanced.

There are also a couple of memory leaks obscured by the memset, so this
fixes those as well.

Finally, we should be able to get rid of the memset(), as it isn't
necessary.

Cc: qemu-stable@nongnu.org
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-08 15:19:16 +02:00
..
accounting.c
backup.c Convert error_report() to warn_report() 2017-07-13 13:49:58 +02:00
blkdebug.c block: Add PreallocMode to bdrv_truncate() 2017-07-11 17:45:01 +02:00
blkreplay.c
blkverify.c
block-backend.c block: Make blk_all_next() public 2017-07-18 15:14:36 +02:00
bochs.c
cloop.c
commit.c block: Skip implicit nodes in query-block/blockstats 2017-07-24 15:06:04 +02:00
crypto.c block: Add PreallocMode to bdrv_truncate() 2017-07-11 17:45:01 +02:00
crypto.h
curl.c
dirty-bitmap.c dirty-bitmap: Report BlockDirtyInfo.count in bytes, as documented 2017-07-24 15:06:04 +02:00
dmg-bz2.c
dmg.c
dmg.h
file-posix.c block: respect error code from bdrv_getlength in handle_aiocb_write_zeroes 2017-08-08 15:19:16 +02:00
file-win32.c block: Add PreallocMode to BD.bdrv_truncate() 2017-07-11 17:45:01 +02:00
gluster.c Error reporting patches for 2017-07-13 2017-07-14 09:36:40 +01:00
io.c block: move trace probes into bdrv_co_preadv|pwritev 2017-08-07 09:39:35 +01:00
iscsi-opts.c
iscsi.c Error reporting patches for 2017-07-13 2017-07-14 09:36:40 +01:00
linux-aio.c
Makefile.objs qcow2: add bitmaps extension 2017-07-11 17:44:57 +02:00
mirror.c block: Skip implicit nodes in query-block/blockstats 2017-07-24 15:06:04 +02:00
nbd-client.c nbd: Implement NBD_INFO_BLOCK_SIZE on client 2017-07-14 12:04:42 +02:00
nbd-client.h nbd: Create struct for tracking export info 2017-07-14 12:04:41 +02:00
nbd.c nbd: Implement NBD_INFO_BLOCK_SIZE on client 2017-07-14 12:04:42 +02:00
nfs.c block/nfs: fix mutex assertion in nfs_file_close() 2017-08-08 15:19:16 +02:00
null.c block/null: Remove 'filename' option 2017-08-08 15:19:16 +02:00
parallels.c parallels: drop check that bdrv_truncate() is working 2017-08-08 15:19:16 +02:00
qapi.c block/qapi: Remove redundant NULL check to silence Coverity 2017-08-01 18:09:33 +02:00
qcow2-bitmap.c qcow2-bitmap: fix bitmap_free 2017-07-25 16:33:31 +02:00
qcow2-cache.c
qcow2-cluster.c qcow2: add support for LUKS encryption format 2017-07-11 17:44:56 +02:00
qcow2-refcount.c qcow2: fix null pointer dereference 2017-07-31 13:06:38 +03:00
qcow2-snapshot.c
qcow2.c qcow: fix memory leaks related to encryption 2017-07-25 16:33:31 +02:00
qcow2.h block/qcow2: falloc/full preallocating growth 2017-07-11 17:45:02 +02:00
qcow.c qcow: fix memory leaks related to encryption 2017-07-25 16:33:31 +02:00
qed-check.c
qed-cluster.c qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
qed-l2-cache.c qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
qed-table.c qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
qed.c qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
qed.h qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
quorum.c quorum: Set sectors-count to 0 when reporting a flush error 2017-08-08 14:37:00 +02:00
raw-format.c block: Add PreallocMode to bdrv_truncate() 2017-07-11 17:45:01 +02:00
rbd.c Error reporting patches for 2017-07-13 2017-07-14 09:36:40 +01:00
replication.c
sheepdog.c sheepdog: add queue_lock 2017-07-17 11:34:20 +08:00
snapshot.c
ssh.c ssh: support I/O from any AioContext 2017-07-17 11:34:20 +08:00
stream.c
throttle-groups.c block: remove timer canceling in throttle_config() 2017-07-18 15:14:35 +02:00
trace-events block: move trace probes into bdrv_co_preadv|pwritev 2017-08-07 09:39:35 +01:00
vdi.c vdi: make it thread-safe 2017-07-17 11:28:15 +08:00
vhdx-endian.c
vhdx-log.c block/vhdx: check error return of bdrv_truncate() 2017-08-08 14:37:00 +02:00
vhdx.c block/vhdx: check for offset overflow to bdrv_truncate() 2017-08-08 14:37:00 +02:00
vhdx.h
vmdk.c vmdk: Fix error handling/reporting of vmdk_check 2017-08-08 15:19:16 +02:00
vpc.c block/vpc: fix uninitialised variable compiler warning 2017-07-21 15:00:07 +01:00
vvfat.c block/vvfat: Fix compiler warning with gcc 7 2017-07-18 15:14:36 +02:00
vxhs.c
win32-aio.c
write-threshold.c