From: Christian Brauner Date: Mon, 3 Nov 2025 14:57:35 +0000 (+0100) Subject: coredump: use prepare credential guard X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ed3473c5a8b356c8af950a29d5620be337c3cab;p=thirdparty%2Flinux.git coredump: use prepare credential guard Use the prepare credential guard for allocating a new set of credentials. Link: https://patch.msgid.link/20251103-work-creds-guards-prepare_creds-v1-9-b447b82f2c9b@kernel.org Signed-off-by: Christian Brauner --- diff --git a/fs/coredump.c b/fs/coredump.c index 79c681f1d6479..5424a6c4e360d 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1155,7 +1155,6 @@ static void do_coredump(struct core_name *cn, struct coredump_params *cprm, void vfs_coredump(const kernel_siginfo_t *siginfo) { - struct cred *cred __free(put_cred) = NULL; size_t *argv __free(kfree) = NULL; struct core_state core_state; struct core_name cn; @@ -1183,7 +1182,7 @@ void vfs_coredump(const kernel_siginfo_t *siginfo) if (coredump_skip(&cprm, binfmt)) return; - cred = prepare_creds(); + CLASS(prepare_creds, cred)(); if (!cred) return; /*