linux-uconsole/drivers/tee
Dan Carpenter 3f121f15ea BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()
get_user_pages_fast() can return zero in certain error paths.  We should
handle that or else it means we accidentally return ERR_PTR(0) which is
NULL instead of an error pointer.  The callers are not expecting that
and will crash with a NULL dereference.

Change-Id: I8ecf03cf8ddf3b248d765dee3cf0b634e9838678
Fixes: 033ddf12bc ("tee: add register user memory")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 2490cdf643)
Signed-off-by: Victor Chong <victor.chong@linaro.org>
2018-03-05 21:58:40 +05:30
..
optee BACKPORT: tee: optee: check type of registered shared memory 2018-03-05 21:58:40 +05:30
Kconfig BACKPORT: tee: add ARM_SMCCC dependency 2018-01-22 13:16:20 +05:30
Makefile
tee_core.c BACKPORT: tee: use reference counting for tee_context 2018-03-05 21:58:40 +05:30
tee_private.h BACKPORT: tee: use reference counting for tee_context 2018-03-05 21:58:40 +05:30
tee_shm.c BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register() 2018-03-05 21:58:40 +05:30
tee_shm_pool.c BACKPORT: tee: flexible shared memory pool creation 2018-03-05 21:58:40 +05:30