]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
kselftest/arm64/gcs: Correctly check return value when disabling GCS
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 21 Aug 2025 15:13:02 +0000 (17:13 +0200)
committerWill Deacon <will@kernel.org>
Mon, 8 Sep 2025 14:54:39 +0000 (15:54 +0100)
The return value was not assigned to 'ret', so the check afterwards
does not do anything.

Fixes: 3d37d4307e0f ("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>
tools/testing/selftests/arm64/gcs/basic-gcs.c

index 54f9c888249d74451e1432280a395156ce72e56c..100d2a983155f7347a19b2b8b88f9494dc6a51d5 100644 (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);