summaryrefslogtreecommitdiff
path: root/fs/coredump.c
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-06-12 15:25:32 +0200
committerChristian Brauner <brauner@kernel.org>2025-07-07 12:24:50 +0200
commit8434fac512d35597488b13e23cc85e2903f5c8ae (patch)
treed6a022ff933ce3d9e9995fea68052324777545e2 /fs/coredump.c
parent4a9f5d7fb6649af534c36aa8cc9c1aa51b172ad9 (diff)
coredump: directly return
instead of jumping to a pointless cleanup label. Link: https://lore.kernel.org/20250612-work-coredump-massage-v1-18-315c0c34ba94@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/coredump.c')
-rw-r--r--fs/coredump.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index 68da77d00170..b2e9ac34d9a3 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -1095,13 +1095,13 @@ void vfs_coredump(const kernel_siginfo_t *siginfo)
binfmt = mm->binfmt;
if (!binfmt || !binfmt->core_dump)
- goto fail;
+ return;
if (!__get_dumpable(cprm.mm_flags))
- goto fail;
+ return;
cred = prepare_creds();
if (!cred)
- goto fail;
+ return;
/*
* We cannot trust fsuid as being the "true" uid of the process
* nor do we know its entire history. We only know it was tainted
@@ -1194,7 +1194,6 @@ fail_unlock:
revert_creds(old_cred);
fail_creds:
put_cred(cred);
-fail:
return;
}