1. 27 11月, 2011 37 次提交
  2. 24 11月, 2011 3 次提交
    • L
      Linux 3.2-rc3 · caca6a03
      Linus Torvalds 提交于
      caca6a03
    • L
      Merge git://github.com/rustyrussell/linux · 9b82e65d
      Linus Torvalds 提交于
      * git://github.com/rustyrussell/linux:
        virtio-pci: make reset operation safer
        virtio-mmio: Correct the name of the guest features selector
        virtio: add HAS_IOMEM dependency to MMIO platform bus driver
      9b82e65d
    • M
      virtio-pci: make reset operation safer · e6af578c
      Michael S. Tsirkin 提交于
      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: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      e6af578c