Skip to content
Commit f7e4ced1 authored by Jorge A. Ramirez-Ortiz's avatar Jorge A. Ramirez-Ortiz Committed by Jérôme Forissier
Browse files

teec: do fail on MAX_SIZE allocation requests



The variable aligned_sz will be 0 when the requested sz is MAX_SIZE.
Since posix_memalign can return a valid pointer for zero size
allocations, share memory registration requests for MAX_SIZE might make
it to the kernel.

This PR stops it early - just as it was before "teec: use multiple of
page size for page aligned buffers" was merged.

Fixes: acb0885c ("teec: use multiple of page size for page aligned buffers")
Signed-off-by: Jorge A. Ramirez-Ortiz's avatarJorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Jens Wiklander's avatarJens Wiklander <jens.wiklander@linaro.org>
parent 333e5128
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment