autofs: fix autofs_sbi() does not check super block type
authorIan Kent <raven@themaw.net>
Wed, 22 Aug 2018 04:51:45 +0000 (21:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 22 Aug 2018 17:52:43 +0000 (10:52 -0700)
commit0633da48f0793aeba27f82d30605624416723a91
treeee94fd9c9cc86c68eb38cab80c02a34982ac69aa
parent778a33959a8ad4cb1ea2f4c5119f9e1e8b9f9d9b
autofs: fix autofs_sbi() does not check super block type

autofs_sbi() does not check the superblock magic number to verify it has
been given an autofs super block.

Link: http://lkml.kernel.org/r/153475422934.17131.7563724552005298277.stgit@pluto.themaw.net
Reported-by: <syzbot+87c3c541582e56943277@syzkaller.appspotmail.com>
Signed-off-by: Ian Kent <raven@themaw.net>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/autofs/autofs_i.h
fs/autofs/inode.c