commit | 2490cdf6435b1d3cac0dbf710cd752487c67c296 | [log] [tgz] |
---|---|---|
author | Dan Carpenter <dan.carpenter@oracle.com> | Sat Jan 06 12:22:30 2018 +0300 |
committer | Jens Wiklander <jens.wiklander@linaro.org> | Tue Jan 09 14:34:00 2018 +0100 |
tree | afb63b0da6212dacd08ab4ec7b81922a99b9295e | |
parent | c94f31b526fe658c25dd2d07c90486a85437f01c [diff] |
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. Fixes: 033ddf12bcf5 ("tee: add register user memory") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>