]> git.ipfire.org Git - thirdparty/linux.git/commit
autofs: add: new_inode check in autofs_fill_super()
authorIan Kent <raven@themaw.net>
Sun, 19 Nov 2023 22:53:19 +0000 (06:53 +0800)
committerChristian Brauner <brauner@kernel.org>
Mon, 20 Nov 2023 13:56:36 +0000 (14:56 +0100)
commit66917f85db6002ed09cd24186258892fcfca64b6
tree29d6891850fa0f3582a58604a0c90ccd6a64e632
parentfe2c34bab6d46469ad3095955dc37e984dc24e38
autofs: add: new_inode check in autofs_fill_super()

Add missing NULL check of root_inode in autofs_fill_super().

While we are at it simplify the logic by taking advantage of the VFS
cleanup procedures and get rid of the goto error handling, as suggested
by Al Viro.

Signed-off-by: Ian Kent <raven@themaw.net>
Link: https://lore.kernel.org/r/20231119225319.331156-1-raven@themaw.net
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Bill O'Donnell <billodo@redhat.com>
Reported-by: <syzbot+662f87a8ef490f45fa64@syzkaller.appspotmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/autofs/inode.c