Skip to content

Commit 8434fac

Browse files
committed
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>
1 parent 4a9f5d7 commit 8434fac

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

fs/coredump.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,13 +1095,13 @@ void vfs_coredump(const kernel_siginfo_t *siginfo)
10951095

10961096
binfmt = mm->binfmt;
10971097
if (!binfmt || !binfmt->core_dump)
1098-
goto fail;
1098+
return;
10991099
if (!__get_dumpable(cprm.mm_flags))
1100-
goto fail;
1100+
return;
11011101

11021102
cred = prepare_creds();
11031103
if (!cred)
1104-
goto fail;
1104+
return;
11051105
/*
11061106
* We cannot trust fsuid as being the "true" uid of the process
11071107
* nor do we know its entire history. We only know it was tainted
@@ -1194,7 +1194,6 @@ void vfs_coredump(const kernel_siginfo_t *siginfo)
11941194
revert_creds(old_cred);
11951195
fail_creds:
11961196
put_cred(cred);
1197-
fail:
11981197
return;
11991198
}
12001199

0 commit comments

Comments
 (0)