Thread (15 messages) 15 messages, 2 authors, 2025-11-03
STALE219d

[PATCH 05/12] coredump: move revert_cred() before coredump_cleanup()

From: Christian Brauner <brauner@kernel.org>
Date: 2025-11-03 14:58:05
Also in: cgroups, linux-cifs, linux-crypto, linux-fsdevel, linux-nfs, linux-unionfs, lkml, netdev
Subsystem: filesystems (vfs and infrastructure), the rest · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds

There's no need to pin the credentials across the coredump_cleanup()
call. Nothing in there depends on elevated credentials.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 fs/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/coredump.c b/fs/coredump.c
index 5c1c381ee380..4fce2a2f279c 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -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;
 }
 
-- 
2.47.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help