mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
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>
This commit is contained in:
@@ -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;
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user