[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 22/26] virtio-ccw: Fix unsetting of indicators.
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 22/26] virtio-ccw: Fix unsetting of indicators. |
Date: |
Wed, 12 Jun 2013 16:41:34 -0500 |
From: Cornelia Huck <address@hidden>
Interpretation of the ccws to register (configuration) indicators contained
a thinko: We want to disallow reading from 0, but setting the indicator
pointer to 0 is fine.
Let's fix the handling for CCW_CMD_SET{,_CONF}_IND.
Cc: address@hidden
Signed-off-by: Cornelia Huck <address@hidden>
(cherry picked from commit d1db1fa8dfcea9c62643f624f2a07d2fd375ce45)
Signed-off-by: Michael Roth <address@hidden>
---
hw/s390x/virtio-ccw.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 5f5e267..44f5772 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -328,10 +328,10 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
ret = -EINVAL;
break;
}
- indicators = ldq_phys(ccw.cda);
- if (!indicators) {
+ if (!ccw.cda) {
ret = -EFAULT;
} else {
+ indicators = ldq_phys(ccw.cda);
dev->indicators = indicators;
sch->curr_status.scsw.count = ccw.count - sizeof(indicators);
ret = 0;
@@ -348,10 +348,10 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
ret = -EINVAL;
break;
}
- indicators = ldq_phys(ccw.cda);
- if (!indicators) {
+ if (!ccw.cda) {
ret = -EFAULT;
} else {
+ indicators = ldq_phys(ccw.cda);
dev->indicators2 = indicators;
sch->curr_status.scsw.count = ccw.count - sizeof(indicators);
ret = 0;
--
1.7.9.5
- [Qemu-stable] [PATCH 10/26] Revert "roms: switch oldnoconfig to olddefconfig", (continued)
- [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
- [Qemu-stable] [PATCH 13/26] Remove OSS support for OpenBSD, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 14/26] xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional), Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 15/26] do not check pointers after dereferencing them, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 16/26] qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 17/26] host-libusb: Correct test for USB packet state, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 18/26] Fix usage of USB_DEV_FLAG_IS_HOST flag., Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 20/26] ui/gtk.c: Fix *BSD build of Gtk+ UI, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 19/26] vmxnet3: fix NICState cleanup, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 22/26] virtio-ccw: Fix unsetting of indicators.,
Michael Roth <=
- [Qemu-stable] [PATCH 21/26] s390x/css: Fix concurrent sense., Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 24/26] qemu-char: don't issue CHR_EVENT_OPEN in a BH, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 25/26] target-i386: Fix aflag logic for CODE64 and the 0x67 prefix, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 26/26] q35: set fw_name, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 23/26] xilinx_axidma: Do not set DMA .notify to NULL after notify, Michael Roth, 2013/06/12
- [Qemu-stable] [PATCH 11/26] update seabios to release 1.7.2.2, Michael Roth, 2013/06/12
- Re: [Qemu-stable] [Qemu-devel] Patch Round-up for stable 1.5.1, freeze on 2013-06-19, Stefan Hajnoczi, 2013/06/13
- Re: [Qemu-stable] Patch Round-up for stable 1.5.1, freeze on 2013-06-19, Paolo Bonzini, 2013/06/13