driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IDBQ74 ---------------------------------------------------------------------- The raw address may still have memory tag applied on the high bits of the address, which may interfere the check here. Use untagged variable start to do the validation instead. Fixes: e6ecc3b028b8 ("soc cache: Add framework driver for HiSilicon SoC cache") Signed-off-by: Yushan Wang <wangyushan12@huawei.com> Signed-off-by: Hongye Lin <linhongye@h-partners.com> --- drivers/soc/hisilicon/hisi_soc_cache_framework.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/hisilicon/hisi_soc_cache_framework.c b/drivers/soc/hisilicon/hisi_soc_cache_framework.c index 30a2b4148630..4f9514944ec8 100644 --- a/drivers/soc/hisilicon/hisi_soc_cache_framework.c +++ b/drivers/soc/hisilicon/hisi_soc_cache_framework.c @@ -480,7 +480,7 @@ static int __hisi_soc_cache_maintain(unsigned long __user vaddr, size_t size, mmap_read_lock_killable(current->mm); vma = vma_lookup(current->mm, vaddr); - if (!range_in_vma(vma, vaddr, vaddr + size)) { + if (!range_in_vma(vma, start, vaddr + size)) { ret = -EINVAL; goto out; } -- 2.33.0