diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2022-08-22 07:43:35 +0200 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2022-08-25 11:40:06 +0200 |
commit | eccd7439709810127563e7e3e49b8b44c7b2791d (patch) | |
tree | 2ff9c0919bb502a30dff667a47d5a3a35ce7df2f /drivers | |
parent | 1c23f9e627a7b412978b4e852793c5e3c3efc555 (diff) | |
download | linux-eccd7439709810127563e7e3e49b8b44c7b2791d.tar.bz2 |
tee: fix compiler warning in tee_shm_register()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tee/tee_shm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c index 1175f3a46859..27295bda3e0b 100644 --- a/drivers/tee/tee_shm.c +++ b/drivers/tee/tee_shm.c @@ -9,6 +9,7 @@ #include <linux/sched.h> #include <linux/slab.h> #include <linux/tee_drv.h> +#include <linux/uaccess.h> #include <linux/uio.h> #include "tee_private.h" |