Commit 0c2badd9 authored by Yunsheng Lin's avatar Yunsheng Lin Committed by Yang Yingliang
Browse files

iommu/dma: Fix for dereferencing before null checking



mainline inclusion
from mainline-v5.4-rc1
commit 6b0c54e7
category: bugfix
bugzilla: 21318
CVE: NA

-------------------------------------------------------------------------

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

This patch moves the dereferencing after the null checking.

Fixes: fdbe574e ("iommu/dma: Allow MSI-only cookies")
Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Conflicts:
	drivers/iommu/dma-iommu.c

Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 0eaddc22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment