summaryrefslogtreecommitdiff
path: root/include/linux/stackprotector.h
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2026-04-03 05:08:39 +0300
committerJosh Poimboeuf <jpoimboe@kernel.org>2026-05-05 07:16:03 +0300
commitf3048888ea62ac1c573db91e74e0dcabe058e89f (patch)
tree2fb24a1c2938c2667bde8512da6ac5300bf10719 /include/linux/stackprotector.h
parent96524543740ead39a79cf36bb4361f93cde1629c (diff)
downloadlinux-f3048888ea62ac1c573db91e74e0dcabe058e89f.tar.xz
klp-build: Fix patch cleanup on interrupt
If a build error occurs and the user hits Ctrl-C while a large patch is being reverted during cleanup, the cleanup EXIT trap gets re-triggered and tries to re-revert the already partially-reverted patch. That causes 'patch -R' to repeatedly prompt "Unreversed patch detected! Ignore -R? [n]" for each already-reverted hunk, with no way to break out. Fix it by adding '--force' to the patch revert command in revert_patch(), which causes it to silently ignore already-reverted hunks. And ignore errors, as the cleanup is always best-effort. For similar reasons, add to APPLIED_PATCHES before (rather than after) applying the patch in apply_patch() so an interrupted apply will also get cleaned up. Fixes: d36a7343f4ba ("livepatch/klp-build: switch to GNU patch and recountdiff") Acked-by: Song Liu <song@kernel.org> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions