[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 6d31f5: tests/9pfs: use g_autofree where poss
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 6d31f5: tests/9pfs: use g_autofree where possible |
Date: |
Sun, 13 Feb 2022 02:47:17 -0800 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 6d31f5fc56eed4bca8745215ca726c6b74b374ff
https://github.com/qemu/qemu/commit/6d31f5fc56eed4bca8745215ca726c6b74b374ff
Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
Date: 2022-02-10 (Thu, 10 Feb 2022)
Changed paths:
M tests/qtest/virtio-9p-test.c
Log Message:
-----------
tests/9pfs: use g_autofree where possible
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <E1mn1fA-0005qZ-TM@lizzy.crudebyte.com>
Commit: 5279f88ced3f628b475f7b9e1cb3b5f4c0377b8c
https://github.com/qemu/qemu/commit/5279f88ced3f628b475f7b9e1cb3b5f4c0377b8c
Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
Date: 2022-02-10 (Thu, 10 Feb 2022)
Changed paths:
M tests/qtest/libqos/virtio-9p.c
Log Message:
-----------
tests/9pfs: fix mkdir() being called twice
The 9p test cases use mkdtemp() to create a temporary directory for
running the 'local' 9p tests with real files/dirs. Unlike mktemp()
which only generates a unique file name, mkdtemp() also creates the
directory, therefore the subsequent mkdir() was wrong and caused
errors on some systems.
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Fixes: 136b7af2 (tests/9pfs: fix test dir for parallel tests)
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/832
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Greg Kurz <Greg Kurz <groug@kaod.org>
Message-Id:
<f6602123c6f7d0d593466231b04fba087817abbd.1642879848.git.qemu_oss@crudebyte.com>
Commit: 98c520acce46f855d29f5f7c857103975926939e
https://github.com/qemu/qemu/commit/98c520acce46f855d29f5f7c857103975926939e
Author: Greg Kurz <groug@kaod.org>
Date: 2022-02-10 (Thu, 10 Feb 2022)
Changed paths:
M tests/qtest/libqos/virtio-9p.c
Log Message:
-----------
tests/9pfs: Fix leak of local_test_path
local_test_path is allocated in virtio_9p_create_local_test_dir() to hold the
path
of the temporary directory. It should be freed in
virtio_9p_remove_local_test_dir()
when the temporary directory is removed. Clarify the lifecycle of
local_test_path
while here.
Based-on:
<f6602123c6f7d0d593466231b04fba087817abbd.1642879848.git.qemu_oss@crudebyte.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <20220201151508.190035-2-groug@kaod.org>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Commit: 7c1101e9be922915491bc9ec2ca2150554192d53
https://github.com/qemu/qemu/commit/7c1101e9be922915491bc9ec2ca2150554192d53
Author: Greg Kurz <groug@kaod.org>
Date: 2022-02-10 (Thu, 10 Feb 2022)
Changed paths:
M tests/qtest/libqos/virtio-9p.c
Log Message:
-----------
tests/9pfs: Use g_autofree and g_autoptr where possible
It is recommended to use g_autofree or g_autoptr as it reduces
the odds of introducing memory leaks in future changes.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <20220201151508.190035-3-groug@kaod.org>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Commit: de19c79dad6a2cad54ae04ce754d47c07bf9bc93
https://github.com/qemu/qemu/commit/de19c79dad6a2cad54ae04ce754d47c07bf9bc93
Author: Vitaly Chikunov <vt@altlinux.org>
Date: 2022-02-10 (Thu, 10 Feb 2022)
Changed paths:
M hw/9pfs/codir.c
M include/qemu/osdep.h
M util/osdep.c
Log Message:
-----------
9pfs: Fix segfault in do_readdir_many caused by struct dirent overread
`struct dirent' returned from readdir(3) could be shorter (or longer)
than `sizeof(struct dirent)', thus memcpy of sizeof length will overread
into unallocated page causing SIGSEGV. Example stack trace:
#0 0x00005555559ebeed v9fs_co_readdir_many (/usr/bin/qemu-system-x86_64 +
0x497eed)
#1 0x00005555559ec2e9 v9fs_readdir (/usr/bin/qemu-system-x86_64 + 0x4982e9)
#2 0x0000555555eb7983 coroutine_trampoline (/usr/bin/qemu-system-x86_64 +
0x963983)
#3 0x00007ffff73e0be0 n/a (n/a + 0x0)
While fixing, provide a helper for any future `struct dirent' cloning.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/841
Cc: qemu-stable@nongnu.org
Co-authored-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Acked-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <20220206013419.849161-1-vt@altlinux.org>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Commit: c011e4ae50b26cbf5902f129a3df5e3edb03672f
https://github.com/qemu/qemu/commit/c011e4ae50b26cbf5902f129a3df5e3edb03672f
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2022-02-13 (Sun, 13 Feb 2022)
Changed paths:
M hw/9pfs/codir.c
M include/qemu/osdep.h
M tests/qtest/libqos/virtio-9p.c
M tests/qtest/virtio-9p-test.c
M util/osdep.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20220210'
into staging
9pfs: fixes and cleanup
* Fifth patch fixes a 9pfs server crash that happened on some systems due
to incorrect (system dependant) handling of struct dirent size.
* Tests: Second patch fixes a test error that happened on some systems due
mkdir() being called twice for creating the test directory for the 9p
'local' tests.
* Tests: Third patch fixes a memory leak.
* Tests: The remaining two patches are code cleanup.
# gpg: Signature made Thu 10 Feb 2022 11:21:38 GMT
# gpg: using RSA key 96D8D110CF7AF8084F88590134C2B58765A47395
# gpg: issuer "qemu_oss@crudebyte.com"
# gpg: Good signature from "Christian Schoenebeck <qemu_oss@crudebyte.com>"
[unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: ECAB 1A45 4014 1413 BA38 4926 30DB 47C3 A012 D5F4
# Subkey fingerprint: 96D8 D110 CF7A F808 4F88 5901 34C2 B587 65A4 7395
* remotes/cschoenebeck/tags/pull-9p-20220210:
9pfs: Fix segfault in do_readdir_many caused by struct dirent overread
tests/9pfs: Use g_autofree and g_autoptr where possible
tests/9pfs: Fix leak of local_test_path
tests/9pfs: fix mkdir() being called twice
tests/9pfs: use g_autofree where possible
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/48033ad678ae...c011e4ae50b2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 6d31f5: tests/9pfs: use g_autofree where possible,
Peter Maydell <=