linux/fs/autofs
Hui Peng aa5e44b29f
autofs: fix sbi->pipe file reference leak in autofs_kill_sb()
When autofs_fill_super() fails before clearing AUTOFS_SBI_CATATONIC (for
example, when find_get_pid() fails on an invalid pgrp mount option, or
when an fs_context is closed before mounting), deactivate_locked_super()
invokes autofs_kill_sb() -> autofs_catatonic_mode(sbi).

Because AUTOFS_SBI_CATATONIC is still set in sbi->flags,
autofs_catatonic_mode() returns early without calling fput(sbi->pipe),
permanently leaking the pipe struct file reference.

Explicitly release sbi->pipe in autofs_kill_sb() if it is still non-NULL
after autofs_catatonic_mode().

Fixes: ebc921ca9b ("autofs: copy autofs4 to autofs")
Signed-off-by: Hui Peng <benquike@gmail.com>
Link: https://patch.msgid.link/20260919204808.2812930-1-benquike@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-09-25 16:51:46 +02:00
..
autofs_i.h autofs: dont trigger mount if it cant succeed 2025-11-19 11:14:02 +01:00
dev-ioctl.c autofs: fix per-dentry timeout warning 2025-12-04 09:57:51 +01:00
expire.c autofs: add per dentry expire timeout 2024-08-30 08:22:36 +02:00
init.c fs: autofs: add MODULE_DESCRIPTION() 2024-05-28 12:06:59 +02:00
inode.c autofs: fix sbi->pipe file reference leak in autofs_kill_sb() 2026-09-25 16:51:46 +02:00
Kconfig arch/*/configs/*defconfig: Replace AUTOFS4_FS by AUTOFS_FS 2023-07-29 14:08:22 -07:00
Makefile
root.c autofs: drop redundant S_IFDIR from mkdir 2026-07-01 12:48:44 +02:00
symlink.c
waitq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00