]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: signal: Remove unnecessary check when saving POE state
authorKevin Brodsky <kevin.brodsky@arm.com>
Tue, 29 Oct 2024 14:45:36 +0000 (14:45 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 4 Nov 2024 16:31:25 +0000 (16:31 +0000)
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>
arch/arm64/kernel/signal.c

index c7d311d8b92a2eeac1b0524b226a926e4fe79b46..d5eb517cc4dfa508e2dead9fc241761a1c0149a8 100644 (file)
@@ -1154,7 +1154,7 @@ static int setup_sigframe(struct rt_sigframe_user_layout *user,
                err |= preserve_fpmr_context(fpmr_ctx);
        }
 
-       if (system_supports_poe() && err == 0 && user->poe_offset) {
+       if (system_supports_poe() && err == 0) {
                struct poe_context __user *poe_ctx =
                        apply_user_offset(user, user->poe_offset);