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>
This commit is contained in:
Christian Brauner committed 2025-11-05 23:11:51 +01:00
1 parent b7b4f7554b
commit eb937201ba
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}