]> www.infradead.org Git - users/dwmw2/linux.git/commit
autofs: fix missing fput for FSCONFIG_SET_FD
authorAleksa Sarai <cyphar@cyphar.com>
Wed, 31 Jul 2024 13:10:27 +0000 (23:10 +1000)
committerChristian Brauner <brauner@kernel.org>
Mon, 19 Aug 2024 11:45:03 +0000 (13:45 +0200)
commit6a64c5220c5df235448b846aeff3c0660d4cc83e
tree3036e6102f537933ebca567caa9a8eb4d8a9570e
parent6c203968f5af720ee2f4a8a17734e40aabe7b96b
autofs: fix missing fput for FSCONFIG_SET_FD

If you pass an fd using FSCONFIG_SET_FD, autofs_parse_fd() "steals" the
param->file and so the fs_context infrastructure will not do fput() for
us.

Fixes: e6ec453bd0f0 ("autofs: convert autofs to use the new mount api")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Link: https://lore.kernel.org/r/20240731-fsconfig-fsparam_fd-fixes-v2-1-e7c472224417@cyphar.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/autofs/inode.c