Re: [PATCH RESEND v2] uio/uio_pci_generic: Disable bus-mastering on release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 12, 2019 at 1:18 AM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Jan 22, 2019 at 08:13:06PM +0000, Venkatesh Srinivas wrote:
> > From: Venkatesh Srinivas <venkateshs@xxxxxxxxxx>
> >
> > 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@xxxxxxxxxx>
> > Reviewed-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> > Reviewed-by: Catherine Sullivan <csully@xxxxxxxxxx>
> > Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
> > ---
> >  drivers/uio/uio_pci_generic.c | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
>
> Why is this a "resend" and what changed from the other versions?  That
> should go below the --- line.
>
> thanks,
>
> greg k-h

I originally sent V2 of this patch in November
(https://www.spinics.net/lists/kvm/msg177574.html),
it was acked by mst@xxxxxxxxxx. I didn't realize I had to cc Greg, the
resend was so Greg and
Patchwork would see it.

Sorry about that,
-- vs;



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux