Skip to content
Commit 462b60f6 authored by David Woodhouse's avatar David Woodhouse
Browse files

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: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 1f0ef2aa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment