]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
virtio/s390: avoid race on vcdev->config
authorHalil Pasic <pasic@linux.ibm.com>
Tue, 19 Mar 2019 16:15:00 +0000 (16:15 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Mon, 25 Mar 2019 06:16:44 +0000 (02:16 -0400)
commit5c4844b8d39a486a742fac4457c30d8e70d4fe3b
treee28fb0a53dee1d6f8bf3532452b23b7832cedc30
parentfcc15f1f5d646834d208be74c7ce30a29150c629
virtio/s390: avoid race on vcdev->config

BugLink: https://bugs.launchpad.net/bugs/1788432
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>
(cherry picked from commit 2448a299ec416a80f699940a86f4a6d9a4f643b1)
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/s390/virtio/virtio_ccw.c