iommu/vt-d: fix a race window in allocating domain ID for virtual machines
authorJiang Liu <jiang.liu@linux.intel.com>
Mon, 6 Jan 2014 06:18:10 +0000 (14:18 +0800)
committerJoerg Roedel <joro@8bytes.org>
Thu, 9 Jan 2014 11:43:24 +0000 (12:43 +0100)
commit18d99165d3ebe5e365de57bcc673901d754c7142
tree9729b26cae46a1ebf2c66cdd8de7418beb4948c3
parentada4d4b2a32e9f63d4dcb9f69578473408f4622c
iommu/vt-d: fix a race window in allocating domain ID for virtual machines

Function intel_iommu_domain_init() may be concurrently called by upper
layer without serialization, so use atomic_t to protect domain id
allocation.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/intel-iommu.c