]> git.baikalelectronics.ru Git - kernel.git/commit
intel-iommu: Fix tiny theoretical race in write-buffer flush.
authorDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 10 May 2009 19:18:18 +0000 (20:18 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 10 May 2009 19:18:18 +0000 (20:18 +0100)
commit743a0a033622606e976303d2f34021de6ad97694
tree5f034b5c4993311147f78285a4ffab37def99ed6
parentee265de53ba192c1a8bfc409ec4f5c3e00f278b9
intel-iommu: Fix tiny theoretical race in write-buffer flush.

In iommu_flush_write_buffer() we read iommu->gcmd before taking the
register_lock, and then we mask in the WBF bit and write it to the
register.

There is a tiny chance that something else could have _changed_
iommu->gcmd before we take the lock, but after we read it. So we could
be undoing that change.

Never actually going to have happened in practice, since nothing else
changes that register at runtime -- aside from the write-buffer flush
it's only ever touched at startup for enabling translation, etc.

But worth fixing anyway.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/pci/intel-iommu.c