]> 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)
commitc46d5c43e8e3c8585b5b1f90de5b937d0ed8d2f1
treeec59ad83cad68ff3994928323dc38762397db82c
parentbb64c2e176485edeebfa216008852c3be3eeda2b
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: 2059792d54e3 ("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