]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Check PM_LEVEL_SIZE() condition in locked section
authorJoerg Roedel <jroedel@suse.de>
Fri, 18 Oct 2019 09:34:22 +0000 (11:34 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 18 Oct 2019 14:52:37 +0000 (16:52 +0200)
commit833aba0d7fb5580717dec6b41960af7ffea72519
treeec59ad83cad68ff3994928323dc38762397db82c
parentfd4e2e4b5701f4a26fab30dda87b70f290777812
iommu/amd: Check PM_LEVEL_SIZE() condition in locked section

The increase_address_space() function has to check the PM_LEVEL_SIZE()
condition again under the domain->lock to avoid a false trigger of the
WARN_ON_ONCE() and to avoid that the address space is increase more
often than necessary.

Reported-by: Qian Cai <cai@lca.pw>
Fixes: ccea77af9e83 ("iommu/amd: Fix race in increase_address_space()")
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c