From: Christian Brauner Date: Mon, 3 Nov 2025 14:57:31 +0000 (+0100) Subject: coredump: move revert_cred() before coredump_cleanup() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb937201bad03bf2f25ac630979e521fbb5e2a07;p=thirdparty%2Flinux.git coredump: move revert_cred() before coredump_cleanup() There's no need to pin the credentials across the coredump_cleanup() call. Nothing in there depends on elevated credentials. Link: https://patch.msgid.link/20251103-work-creds-guards-prepare_creds-v1-5-b447b82f2c9b@kernel.org Signed-off-by: Christian Brauner --- diff --git a/fs/coredump.c b/fs/coredump.c index 5c1c381ee3806..4fce2a2f279c0 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1197,8 +1197,8 @@ void vfs_coredump(const kernel_siginfo_t *siginfo) } close_fail: - coredump_cleanup(&cn, &cprm); revert_creds(old_cred); + coredump_cleanup(&cn, &cprm); return; }