[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 01/26] hw/9pfs: Fix segfault with 9p2000.u
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 01/26] hw/9pfs: Fix segfault with 9p2000.u |
Date: |
Wed, 12 Jun 2013 16:41:13 -0500 |
From: "Aneesh Kumar K.V" <address@hidden>
When guest tries to chmod a block or char device file over 9pfs,
the qemu process segfaults. With 9p2000.u protocol we use wstat to
change mode bits and client don't send extension information for
chmod. We need to check for size field to check whether extension
info is present or not.
Reported-by: Michael Tokarev <address@hidden>
Acked-by: Michael Tokarev <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>
(cherry picked from commit c7e587b73ebac05943df78f5f37d80d32ff47d3d)
Signed-off-by: Michael Roth <address@hidden>
---
hw/9pfs/virtio-9p.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 296f66f..8cbb8ae 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -658,7 +658,7 @@ static mode_t v9mode_to_mode(uint32_t mode, V9fsString
*extension)
ret |= S_IFIFO;
}
if (mode & P9_STAT_MODE_DEVICE) {
- if (extension && extension->data[0] == 'c') {
+ if (extension->size && extension->data[0] == 'c') {
ret |= S_IFCHR;
} else {
ret |= S_IFBLK;
--
1.7.9.5
- [Qemu-stable] Patch Round-up for stable 1.5.1, freeze on 2013-06-19, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 01/26] hw/9pfs: Fix segfault with 9p2000.u,
Michael Roth <=
- [Qemu-stable] [PATCH 03/26] rtl8139: flush queued packets when RxBufPtr is written, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 02/26] hw/9pfs: use O_NOFOLLOW for mapped readlink operation, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 04/26] qom/object: Don't poll cast cache for NULL objects, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 05/26] xen: simplify xen_enabled, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 06/26] main_loop: do not set nonblocking if xen_enabled(), Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 07/26] xen_machine_pv: do not create a dummy CPU in machine->init, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 08/26] chardev: fix "info chardev" output, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 09/26] ide: Set BSY bit during FLUSH, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 10/26] Revert "roms: switch oldnoconfig to olddefconfig", Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 12/26] target-i386: fix abort on bad PML4E/PDPTE/PDE/PTE addresses, Michael Roth, 2013/06/12