]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: add ext4_iget_normal() which is to be used for dir tree lookups
authorTheodore Ts'o <tytso@mit.edu>
Mon, 6 Oct 2014 02:56:00 +0000 (22:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 18:10:30 +0000 (10:10 -0800)
commit207c775cb6c23f2ae887a058f0563344773f77ae
tree3aa04451959a5c39aaec667c09165f12a49192ed
parent1eb9fed3620abb513aa21c49a2a2b8e874d9856c
ext4: add ext4_iget_normal() which is to be used for dir tree lookups

commit f4bb2981024fc91b23b4d09a8817c415396dbabb upstream.

If there is a corrupted file system which has directory entries that
point at reserved, metadata inodes, prohibit them from being used by
treating them the same way we treat Boot Loader inodes --- that is,
mark them to be bad inodes.  This prohibits them from being opened,
deleted, or modified via chmod, chown, utimes, etc.

In particular, this prevents a corrupted file system which has a
directory entry which points at the journal inode from being deleted
and its blocks released, after which point Much Hilarity Ensues.

Reported-by: Sami Liedes <sami.liedes@iki.fi>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/namei.c
fs/ext4/super.c