aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/iommu.c
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2017-08-24 21:13:57 +0800
committerJoerg Roedel <jroedel@suse.de>2017-08-28 11:28:37 +0200
commitec62b1ab0f4ccbc48aa8b9852cc25b38a1f12d1e (patch)
tree165e9d8cd543641d1dfe35622ead52adc39d6133 /drivers/iommu/iommu.c
parentiommu/amd: Fix section mismatch warning (diff)
downloadlinux-dev-ec62b1ab0f4ccbc48aa8b9852cc25b38a1f12d1e.tar.xz
linux-dev-ec62b1ab0f4ccbc48aa8b9852cc25b38a1f12d1e.zip
iommu/amd: Check if domain is NULL in get_domain() and return -EBUSY
In get_domain(), 'domain' could be NULL before it's passed to dma_ops_domain() to dereference. And the current code calling get_domain() can't deal with the returned 'domain' well if its value is NULL. So before dma_ops_domain() calling, check if 'domain' is NULL, If yes just return ERR_PTR(-EBUSY) directly. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: df3f7a6e8e85 ('iommu/amd: Use is_attach_deferred call-back') Signed-off-by: Baoquan He <bhe@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu.c')
0 files changed, 0 insertions, 0 deletions