Re: [PATCH] fs: autofs: fix memory leak in autofs_fill_super()

From: Christian Brauner

Date: Fri Sep 04 2026 - 03:53:22 EST


On Thu, 03 Sep 2026 13:40:48 +0530, Jeffin Philip wrote:
> In autofs_fill_super(), we create a new inode using
> autofs_new_ino(), however, if we fail to create root_inode,
> (that is, root_inode failure path), we return -ENOMEM without
> freeing the new inode(ino) that we created causing a memory leak.
> Fix this by adding autofs_free_ino() to free the inode we created
> in root_inode failure path before returning ENOMEM.
>
> [...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] fs: autofs: fix memory leak in autofs_fill_super()
https://git.kernel.org/vfs/vfs/c/5ab54837fce0