OpenCloudOS-Kernel/drivers/s390
Cornelia Huck 431dae778a KVM: s390: virtio-ccw: don't overwrite config space values
Eric noticed problems with vhost-scsi and virtio-ccw: vhost-scsi
complained about overwriting values in the config space, which
was triggered by a broken implementation of virtio-ccw's config
get/set routines. It was probably sheer luck that we did not hit
this before.

When writing a value to the config space, the WRITE_CONF ccw will
always write from the beginning of the config space up to and
including the value to be set. If the config space up to the value
has not yet been retrieved from the device, however, we'll end up
overwriting values. Keep track of the known config space and update
if needed to avoid this.

Moreover, READ_CONF will only read the number of bytes it has been
instructed to retrieve, so we must not copy more than that to the
buffer, or we might overwrite trailing values.

Reported-by: Eric Farman <farman@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Eric Farman <farman@linux.vnet.ibm.com>
Tested-by: Eric Farman <farman@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-07-03 18:55:18 +02:00
..
block Merge branch 'for-4.2/drivers' of git://git.kernel.dk/linux-block 2015-06-25 15:12:50 -07:00
char s390/kdump: fix nosmt kernel parameter 2015-06-25 09:39:26 +02:00
cio s390: remove use of seq_printf return value 2015-04-15 16:35:25 -07:00
crypto s390/zcrypt: Fixed reset and interrupt handling of AP queues 2015-06-25 09:39:23 +02:00
kvm KVM: s390: virtio-ccw: don't overwrite config space values 2015-07-03 18:55:18 +02:00
net s390/lcs: Fix null-pointer access in msg 2015-05-18 12:14:18 -04:00
scsi scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
Makefile