[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/20] virtio-pmem: fix virtio_pmem_resp assign problem
From: |
Michael S. Tsirkin |
Subject: |
[PULL 08/20] virtio-pmem: fix virtio_pmem_resp assign problem |
Date: |
Mon, 22 Mar 2021 11:44:52 -0400 |
From: Wang Liang <wangliangzz@inspur.com>
ret in virtio_pmem_resp is a uint32_t variable, which should be assigned
using virtio_stl_p.
The kernel side driver does not guarantee virtio_pmem_resp to be initialized
to zero in advance, So sometimes the flush operation will fail.
Signed-off-by: Wang Liang <wangliangzz@inspur.com>
Message-Id: <20210317024145.271212-1-wangliangzz@126.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@cloud.ionos.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/virtio-pmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
index a3e0688a89..d1aeb90a31 100644
--- a/hw/virtio/virtio-pmem.c
+++ b/hw/virtio/virtio-pmem.c
@@ -47,7 +47,7 @@ static int worker_cb(void *opaque)
err = 1;
}
- virtio_stw_p(req_data->vdev, &req_data->resp.ret, err);
+ virtio_stl_p(req_data->vdev, &req_data->resp.ret, err);
return 0;
}
--
MST
- [PULL 00/20] pc,virtio,pci: fixes, features, Michael S. Tsirkin, 2021/03/22
- [PULL 01/20] virtio: Fix virtio_mmio_read()/virtio_mmio_write(), Michael S. Tsirkin, 2021/03/22
- [PULL 03/20] vhost-user: Fix double-close on slave_read() error path, Michael S. Tsirkin, 2021/03/22
- [PULL 02/20] vhost-user: Drop misleading EAGAIN checks in slave_read(), Michael S. Tsirkin, 2021/03/22
- [PULL 04/20] vhost-user: Factor out duplicated slave_fd teardown code, Michael S. Tsirkin, 2021/03/22
- [PULL 05/20] vhost-user: Convert slave channel to QIOChannelSocket, Michael S. Tsirkin, 2021/03/22
- [PULL 06/20] vhost-user: Introduce nested event loop in vhost_user_read(), Michael S. Tsirkin, 2021/03/22
- [PULL 07/20] vhost-user: Monitor slave channel in vhost_user_read(), Michael S. Tsirkin, 2021/03/22
- [PULL 08/20] virtio-pmem: fix virtio_pmem_resp assign problem,
Michael S. Tsirkin <=
- [PULL 09/20] acpi:piix4, vt82c686: reinitialize acpi PM device on reset, Michael S. Tsirkin, 2021/03/22
- [PULL 11/20] pci: introduce acpi-index property for PCI device, Michael S. Tsirkin, 2021/03/22
- [PULL 12/20] pci: acpi: ensure that acpi-index is unique, Michael S. Tsirkin, 2021/03/22
- [PULL 13/20] acpi: add aml_to_decimalstring() and aml_call6() helpers, Michael S. Tsirkin, 2021/03/22
- [PULL 16/20] acpi: Set proper maximum size for "etc/table-loader" blob, Michael S. Tsirkin, 2021/03/22
- [PULL 17/20] microvm: Don't open-code "etc/table-loader", Michael S. Tsirkin, 2021/03/22
- [PULL 18/20] acpi: Move maximum size logic into acpi_add_rom_blob(), Michael S. Tsirkin, 2021/03/22
- [PULL 19/20] acpi: Set proper maximum size for "etc/acpi/rsdp" blob, Michael S. Tsirkin, 2021/03/22
- [PULL 20/20] acpi: Move setters/getters of oem fields to X86MachineState, Michael S. Tsirkin, 2021/03/22
- [PULL 14/20] pci: acpi: add _DSM method to PCI devices, Michael S. Tsirkin, 2021/03/22