kernel-fxtec-pro1x/fs/hfs
Eric Sandeen cf05946250 hfs: handle more on-disk corruptions without oopsing
hfs seems prone to bad things when it encounters on disk corruption.  Many
values are read from disk, and used as lengths to memcpy, as an example.
This patch fixes up several of these problematic cases.

o sanity check the on-disk maximum key lengths on mount
  (these are set to a defined value at mkfs time and shouldn't differ)
o check on-disk node keylens against the maximum key length for each tree
o fix hfs_btree_open so that going out via free_tree: doesn't wind
  up in hfs_releasepage, which wants to follow the very pointer
  we were trying to set up:
	HFS_SB(sb)->cat_tree = hfs_btree_open()
		...
		failure gets to hfs_releasepage and tries
		to follow HFS_SB(sb)->cat_tree

Tested with the fsfuzzer; it survives more than it used to.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08 16:10:36 -08:00
..
attr.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bfind.c hfs: handle more on-disk corruptions without oopsing 2008-01-08 16:10:36 -08:00
bitmap.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bnode.c [PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc 2006-09-27 08:26:10 -07:00
brec.c hfs: handle more on-disk corruptions without oopsing 2008-01-08 16:10:36 -08:00
btree.c hfs: handle more on-disk corruptions without oopsing 2008-01-08 16:10:36 -08:00
btree.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
catalog.c [PATCH] hfs: cleanup HFS prints 2006-01-18 19:20:23 -08:00
dir.c [PATCH] mark struct inode_operations const 2 2007-02-12 09:48:46 -08:00
extent.c hfs: convert to new aops 2007-10-16 09:42:56 -07:00
hfs.h hfs: handle more on-disk corruptions without oopsing 2008-01-08 16:10:36 -08:00
hfs_fs.h [PATCH] mark struct inode_operations const 2 2007-02-12 09:48:46 -08:00
inode.c hfs: convert to new aops 2007-10-16 09:42:56 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mdb.c [PATCH] hfs: cleanup HFS prints 2006-01-18 19:20:23 -08:00
part_tbl.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
string.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
super.c Slab API: remove useless ctor parameter and reorder parameters 2007-10-17 08:42:45 -07:00
sysdep.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
trans.c [PATCH] hfs: NLS support 2005-09-07 16:57:50 -07:00