Skip to content

Commit 466ece4

Browse files
kevin-brodsky-armctmarinas
authored andcommitted
arm64: signal: Remove unnecessary check when saving POE state
The POE frame record is allocated unconditionally if POE is supported. If the allocation fails, a SIGSEGV is delivered before setup_sigframe() can be reached. As a result there is no need to consider poe_offset before saving POR_EL0; just remove that check. This is in line with other frame records (FPMR, TPIDR2). Reviewed-by: Mark Brown <broonie@kernel.org> Reviewed-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Link: https://lore.kernel.org/r/20241029144539.111155-3-kevin.brodsky@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 2e8a1ac commit 466ece4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ static int setup_sigframe(struct rt_sigframe_user_layout *user,
11541154
err |= preserve_fpmr_context(fpmr_ctx);
11551155
}
11561156

1157-
if (system_supports_poe() && err == 0 && user->poe_offset) {
1157+
if (system_supports_poe() && err == 0) {
11581158
struct poe_context __user *poe_ctx =
11591159
apply_user_offset(user, user->poe_offset);
11601160

0 commit comments

Comments
 (0)