kselftest/arm64/gcs: Correctly check return value when disabling GCS

The return value was not assigned to 'ret', so the check afterwards
does not do anything.

Fixes: 3d37d4307e ("kselftest/arm64: Add very basic GCS test program")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
Thomas Weißschuh 2025-08-21 17:13:02 +02:00 committed by Will Deacon
parent 50af02425a
commit 740cdafd0d
1 changed files with 1 additions and 1 deletions

View File

@ -410,7 +410,7 @@ int main(void)
}
/* One last test: disable GCS, we can do this one time */
my_syscall5(__NR_prctl, PR_SET_SHADOW_STACK_STATUS, 0, 0, 0, 0);
ret = my_syscall5(__NR_prctl, PR_SET_SHADOW_STACK_STATUS, 0, 0, 0, 0);
if (ret != 0)
ksft_print_msg("Failed to disable GCS: %d\n", ret);