Searched hist:"865 a11f987ab5f03089b2728420b61a2a1f7051a" (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/uio/ |
H A D | uio_pci_generic.c | diff 865a11f987ab5f03089b2728420b61a2a1f7051a Wed Jan 23 12:27:51 CET 2019 Venkatesh Srinivas <venkateshs@google.com> uio/uio_pci_generic: Disable bus-mastering on release
Userspace code using uio_pci_generic may enable bus-mastering by directly manipulating a PCI device's command register. If a userspace program enables bus-mastering but exits/crashes uncleanly, bus- mastering will still be enabled and stale DMA addresses may be programmed and live in the device.
Disable bus-mastering unconditionally on last close of a UIO PCI fd to avoid this. If the device did not have bus-mastering enabled, pci_clear_master() is a no-op.
Signed-off-by: Venkatesh Srinivas <venkateshs@google.com> Reviewed-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Catherine Sullivan <csully@google.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|