Skip to content

Commit 2714a1e

Browse files
t-8chgregkh
authored andcommitted
kselftest/arm64/gcs: Correctly check return value when disabling GCS
[ Upstream commit 740cdaf ] The return value was not assigned to 'ret', so the check afterwards does not do anything. Fixes: 3d37d43 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8262b85 commit 2714a1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/arm64/gcs/basic-gcs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ int main(void)
410410
}
411411

412412
/* One last test: disable GCS, we can do this one time */
413-
my_syscall5(__NR_prctl, PR_SET_SHADOW_STACK_STATUS, 0, 0, 0, 0);
413+
ret = my_syscall5(__NR_prctl, PR_SET_SHADOW_STACK_STATUS, 0, 0, 0, 0);
414414
if (ret != 0)
415415
ksft_print_msg("Failed to disable GCS: %d\n", ret);
416416

0 commit comments

Comments
 (0)