Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <brauner@kernel.org>

+1 -1
+1 -1
fs/coredump.c
··· 1197 1197 } 1198 1198 1199 1199 close_fail: 1200 - coredump_cleanup(&cn, &cprm); 1201 1200 revert_creds(old_cred); 1201 + coredump_cleanup(&cn, &cprm); 1202 1202 return; 1203 1203 } 1204 1204