]> git.itanic.dy.fi Git - linux-stable/commit
iommu/dma: Fix for dereferencing before null checking
authorYunsheng Lin <linyunsheng@huawei.com>
Sat, 24 Aug 2019 01:47:12 +0000 (09:47 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 30 Aug 2019 14:23:19 +0000 (16:23 +0200)
commit6b0c54e7f2715997c366e8374209bc74259b0a59
tree1fa43637a4d950d1f7ae6e66d878068ecbd8c169
parent4dbd258ff63e0597ee8fb44d277c6c701f5019d9
iommu/dma: Fix for dereferencing before null checking

The cookie is dereferenced before null checking in the function
iommu_dma_init_domain.

This patch moves the dereferencing after the null checking.

Fixes: fdbe574eb693 ("iommu/dma: Allow MSI-only cookies")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c