soc: rockchip: decompress_user fix scatter list check rules

sg_phys(sgl) == SZ_4G must be regarded as an illegal value
 because the address space exceeds 32 bits.

Change-Id: I50dca3970654ea8ce4d60ea20ced7d5dcc843724
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
This commit is contained in:
Lin Jinhan
2025-03-14 14:24:52 +08:00
committed by Tao Huang
parent d0bc6a20e3
commit 8242807f89

View File

@@ -57,7 +57,7 @@ static bool check_scatter_list(unsigned int max_size, struct sg_table *sg_tbl)
return false;
for_each_sgtable_sg(sg_tbl, sgl, i) {
if (sg_phys(sgl) > SZ_4G || sg_phys(sgl) + sg_dma_len(sgl) > SZ_4G)
if (sg_phys(sgl) >= SZ_4G || sg_phys(sgl) + sg_dma_len(sgl) > SZ_4G)
return false;
if (i && next_addr != sg_dma_address(sgl))