]> git.ipfire.org Git - thirdparty/linux.git/commit
coredump: split file coredumping into coredump_file()
authorChristian Brauner <brauner@kernel.org>
Thu, 12 Jun 2025 13:25:24 +0000 (15:25 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 16 Jun 2025 15:01:22 +0000 (17:01 +0200)
commit7bbb05dbea38e56d9f6ac7ac1040f93b0808cbce
tree7c1e4eab6e3266cdf33cf5a9e1132ede1f454ae0
parent70e3ee31282d293c794fb5bbec8efe495c32044b
coredump: split file coredumping into coredump_file()

* Move that whole mess into a separate helper instead of having all that
  hanging around in vfs_coredump() directly.

* Stop using that need_suid_safe variable and add an inline helper that
  clearly communicates what's going on everywhere consistently. The mm
  flag snapshot is stable and can't change so nothing's gained with that
  boolean.

* Only setup cprm->file once everything else succeeded, using RAII for
  the coredump file before. That allows to don't care to what goto label
  we jump in vfs_coredump().

Link: https://lore.kernel.org/20250612-work-coredump-massage-v1-10-315c0c34ba94@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/coredump.c