[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.9 14/45] tests/9p: also check 'Tgetattr' in 'use-after-unlin
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.9 14/45] tests/9p: also check 'Tgetattr' in 'use-after-unlink' test |
Date: |
Mon, 27 Jan 2025 23:25:55 +0300 |
This verifies expected behaviour of previous bug fix patch.
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id:
<7017658155c517b9665b75333a97c79aa2d4f3df.1732465720.git.qemu_oss@crudebyte.com>
(cherry picked from commit eaab44ccc59b83d8dff60fca3361a9b98ec7fee6)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c
index 7638c0a183..86ff86409c 100644
--- a/tests/qtest/virtio-9p-test.c
+++ b/tests/qtest/virtio-9p-test.c
@@ -702,6 +702,7 @@ static void fs_use_after_unlink(void *obj, void *data,
g_autofree char *real_file = virtio_9p_test_path("09/doa_file");
g_autofree char *buf = g_malloc0(write_count);
struct stat st_file;
+ struct v9fs_attr attr;
uint32_t fid_file;
uint32_t count;
@@ -725,6 +726,10 @@ static void fs_use_after_unlink(void *obj, void *data,
tunlinkat({ .client = v9p, .atPath = "09", .name = "doa_file" });
/* file is removed, but we still have it open, so this should succeed */
+ tgetattr({
+ .client = v9p, .fid = fid_file, .request_mask = P9_GETATTR_BASIC,
+ .rgetattr.attr = &attr
+ });
count = twrite({
.client = v9p, .fid = fid_file, .offset = 0, .count = write_count,
.data = buf
--
2.39.5
- [Stable-8.2.9 04/45] linux-user: Fix strace output for s390x mmap(), (continued)
- [Stable-8.2.9 04/45] linux-user: Fix strace output for s390x mmap(), Michael Tokarev, 2025/01/28
- [Stable-8.2.9 05/45] virtio-net: Fix size check in dhclient workaround, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 06/45] qdev: Fix set_pci_devfn() to visit option only once, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 08/45] scsi: megasas: Internal cdbs have 16-byte length, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 07/45] ssh: Do not switch session to non-blocking mode, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 09/45] tests/9p: fix Rreaddir response name, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 10/45] tests/9p: add missing Rgetattr response name, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 11/45] tests/9p: add 'use-after-unlink' test, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 12/45] 9pfs: remove obsolete comment in v9fs_getattr(), Michael Tokarev, 2025/01/28
- [Stable-8.2.9 13/45] 9pfs: fix 'Tgetattr' after unlink, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 14/45] tests/9p: also check 'Tgetattr' in 'use-after-unlink' test,
Michael Tokarev <=
- [Stable-8.2.9 15/45] target/ppc: Fix non-maskable interrupt while halted, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 18/45] hw/openrisc/openrisc_sim: keep serial@90000000 as default, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 17/45] hw/nvme: take a reference on the subsystem on vf realization, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 16/45] hw/nvme: fix msix_uninit with exclusive bar, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 20/45] Update FreeBSD CI jobs FreeBSD 14.1, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 21/45] .gitlab-ci.d/cirrus: Remove the netbsd and openbsd jobs, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 23/45] 9pfs: fix regression regarding CVE-2023-2861, Michael Tokarev, 2025/01/28
- [Stable-8.2.9 19/45] target/riscv: Avoid bad shift in riscv_cpu_do_interrupt(), Michael Tokarev, 2025/01/28
- [Stable-8.2.9 22/45] .gitlab-ci.d/cirrus: Drop support for macOS 13 (Ventura), Michael Tokarev, 2025/01/28
- [Stable-8.2.9 25/45] fuzz: specify audiodev for usb-audio, Michael Tokarev, 2025/01/28