]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Don't overwrite domain pointer when there is no default_domain
authorJoerg Roedel <jroedel@suse.de>
Mon, 4 Apr 2016 13:47:48 +0000 (15:47 +0200)
committerJoerg Roedel <jroedel@suse.de>
Thu, 7 Apr 2016 12:33:03 +0000 (14:33 +0200)
commit87c8b512f9a66c4d5618559aba7c5bb9f4633eda
tree0cdbfb78a24c1e68a679cb9d5006e4afcb0e5735
parentdb02ceec7db080d9bf7baabd1d03a4419b334f46
iommu: Don't overwrite domain pointer when there is no default_domain

IOMMU drivers that do not support default domains, but make
use of the the group->domain pointer can get that pointer
overwritten with NULL on device add/remove.

Make sure this can't happen by only overwriting the domain
pointer when it is NULL.

Cc: stable@vger.kernel.org # v4.4+
Fixes: 96cc92c50557 ('iommu: Move default domain allocation to iommu_group_get_for_dev()')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c