]> git.itanic.dy.fi Git - linux-stable/commit
virtio/s390: avoid race on vcdev->config
authorHalil Pasic <pasic@linux.ibm.com>
Wed, 26 Sep 2018 16:48:29 +0000 (18:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:20:28 +0000 (09:20 +0100)
commit92054f4de90ba3730d73a0cbe97d8ab1543f7c3a
tree3c4d3f0312ac9208c671a18785b6354469eb002a
parent5e51318e088c684c8f665556b2c4d2142aa8f85a
virtio/s390: avoid race on vcdev->config

commit 2448a299ec416a80f699940a86f4a6d9a4f643b1 upstream.

Currently we have a race on vcdev->config in virtio_ccw_get_config() and
in virtio_ccw_set_config().

This normally does not cause problems, as these are usually infrequent
operations. However, for some devices writing to/reading from the config
space can be triggered through sysfs attributes. For these, userspace can
force the race by increasing the frequency.

Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Cc: stable@vger.kernel.org
Message-Id: <20180925121309.58524-2-pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/virtio/virtio_ccw.c