+2
−2
Loading
alloc_gcs() returns an error-encoded pointer on failure, which comes from do_mmap(), not NULL. The current NULL check fails to detect errors, which could lead to using an invalid GCS address. Use IS_ERR_VALUE() to properly detect errors, consistent with the check in gcs_alloc_thread_stack(). Fixes: b57180c7 ("arm64/gcs: Implement shadow stack prctl() interface") Reviewed-by:Mark Brown <broonie@kernel.org> Signed-off-by:
Breno Leitao <leitao@debian.org> Signed-off-by:
Will Deacon <will@kernel.org>