Skip to content

Commit 460e70e

Browse files
Dan Carpenterwilldeacon
authored andcommitted
arm64: delete dead code in this_cpu_set_vectors()
The "slot" variable is an enum, and in this context it is an unsigned int. So the type means it can never be negative and also we never pass invalid data to this function. If something did pass invalid data then this check would be insufficient protection. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent a2a83eb commit 460e70e

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

arch/arm64/kernel/proton-pack.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -966,9 +966,6 @@ static void this_cpu_set_vectors(enum arm64_bp_harden_el1_vectors slot)
966966
{
967967
const char *v = arm64_get_bp_hardening_vector(slot);
968968

969-
if (slot < 0)
970-
return;
971-
972969
__this_cpu_write(this_cpu_vector, v);
973970

974971
/*

0 commit comments

Comments
 (0)