]> git.itanic.dy.fi Git - linux-stable/commit
tee: fix compiler warning in tee_shm_register()
authorJens Wiklander <jens.wiklander@linaro.org>
Mon, 22 Aug 2022 05:43:35 +0000 (07:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 09:32:04 +0000 (11:32 +0200)
commit465eecd2b3a40c488eca5f183add705cd827921e
tree477c14baa6c9c45049b0119be5b87ce84ffa8ad5
parent75c961d01199d8f6d88cb81809f6f5bcbdf19409
tee: fix compiler warning in tee_shm_register()

[ Upstream commit eccd7439709810127563e7e3e49b8b44c7b2791d ]

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: 573ae4f13f63 ("tee: add overflow check in register_shm_helper()")
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tee/tee_shm.c