提交 b1e17d35 编写于 作者: Z Zhou Guanghui 提交者: Wang Wensheng

mm/sharepool: fix the incorrect judgement of the addr range

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5XQS4
CVE: NA

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

The address range of dvpp is [start, start + size), the value of
start + size can be out of the address range.
Signed-off-by: NZhou Guanghui <zhouguanghui1@huawei.com>
上级 107e2b7c
......@@ -3634,7 +3634,7 @@ bool mg_sp_config_dvpp_range(size_t start, size_t size, int device_id, int pid)
/* NOTE: check the start address */
if (pid < 0 || size <= 0 || size > MMAP_SHARE_POOL_16G_SIZE ||
device_id < 0 || device_id >= MAX_DEVID || !is_online_node_id(device_id)
|| !is_sp_dynamic_dvpp_addr(start) || !is_sp_dynamic_dvpp_addr(start + size))
|| !is_sp_dynamic_dvpp_addr(start) || !is_sp_dynamic_dvpp_addr(start + size - 1))
return false;
ret = get_task(pid, &tsk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册