]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
fat: fix oops on corrupted vfat fs
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 2 Dec 2014 23:59:37 +0000 (15:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Dec 2014 17:36:03 +0000 (09:36 -0800)
commit1ead0e79bfedd4b563b8ea7c585ca3884b0c89a7
tree7ef8e695dea004a6c6d8b8f2b602140b2912a014
parente8577d1f0329d4842e8302e289fb2c22156abef4
fat: fix oops on corrupted vfat fs

a) don't bother with ->d_time for positives - we only check it for
   negatives anyway.

b) make sure to set it at unlink and rmdir time - at *that* point
   soon-to-be negative dentry matches then-current directory contents

c) don't go into renaming of old alias in vfat_lookup() unless it
   has the same parent (which it will, unless we are seeing corrupted
   image)

[hirofumi@mail.parknet.co.jp: make change minimum, don't call d_move() for dir]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: <stable@vger.kernel.org> [3.17.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fat/namei_vfat.c