summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/mga
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2011-11-17 17:41:15 +0200
committerRusty Russell <rusty@rustcorp.com.au>2011-11-24 13:04:48 +1030
commite6af578c5305be693a1bc7f4dc7b51dd82d41425 (patch)
tree7276a130a2d2eddf84660ec2573298e26611a442 /drivers/gpu/drm/mga
parentfe1a7fe2c4456679b3402f04268bdfafca7b127a (diff)
downloadop-kernel-dev-e6af578c5305be693a1bc7f4dc7b51dd82d41425.zip
op-kernel-dev-e6af578c5305be693a1bc7f4dc7b51dd82d41425.tar.gz
virtio-pci: make reset operation safer
virtio pci device reset actually just does an I/O write, which in PCI is really posted, that is it can complete on CPU before the device has received it. Further, interrupts might have been pending on another CPU, so device callback might get invoked after reset. This conflicts with how drivers use reset, which is typically: reset unregister a callback running after reset completed can race with unregister, potentially leading to use after free bugs. Fix by flushing out the write, and flushing pending interrupts. This assumes that device is never reset from its vq/config callbacks, or in parallel with being added/removed, document this assumption. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/gpu/drm/mga')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud