Skip to content

Commit 8ed3473

Browse files
committed
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 <brauner@kernel.org>
1 parent af9803d commit 8ed3473

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/coredump.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,6 @@ static void do_coredump(struct core_name *cn, struct coredump_params *cprm,
11551155

11561156
void vfs_coredump(const kernel_siginfo_t *siginfo)
11571157
{
1158-
struct cred *cred __free(put_cred) = NULL;
11591158
size_t *argv __free(kfree) = NULL;
11601159
struct core_state core_state;
11611160
struct core_name cn;
@@ -1183,7 +1182,7 @@ void vfs_coredump(const kernel_siginfo_t *siginfo)
11831182
if (coredump_skip(&cprm, binfmt))
11841183
return;
11851184

1186-
cred = prepare_creds();
1185+
CLASS(prepare_creds, cred)();
11871186
if (!cred)
11881187
return;
11891188
/*

0 commit comments

Comments
 (0)