mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
|
||
|---|---|---|
| .. | ||
| autofs_i.h | ||
| dev-ioctl.c | ||
| expire.c | ||
| init.c | ||
| inode.c | ||
| Kconfig | ||
| Makefile | ||
| root.c | ||
| symlink.c | ||
| waitq.c | ||