Commit 3dc14832 authored by Jens Wiklander's avatar Jens Wiklander Committed by Jialin Zhang
Browse files

tee: fix compiler warning in tee_shm_register()

stable inclusion
from stable-v5.10.143
commit 465eecd2b3a40c488eca5f183add705cd827921e
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0U6

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=465eecd2b3a40c488eca5f183add705cd827921e



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

[ Upstream commit eccd7439 ]

Include <linux/uaccess.h> to avoid the warning:
   drivers/tee/tee_shm.c: In function 'tee_shm_register':
>> drivers/tee/tee_shm.c:242:14: error: implicit declaration of function 'access_ok' [-Werror=implicit-function-declaration]
     242 |         if (!access_ok((void __user *)addr, length))
         |              ^~~~~~~~~
   cc1: some warnings being treated as errors

Fixes: 573ae4f1 ("tee: add overflow check in register_shm_helper()")
Reviewed-by: default avatarSumit Garg <sumit.garg@linaro.org>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 6144280b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment