kernel-ark/fs/ext3
Carlos Maiolino c3d59ad6ab ext3: ext3_bread usage audit
This is the ext3 version of the same patch applied to Ext4, where such goal is
to audit the usage of ext3_bread() due a possible misinterpretion of its return
value.

Focused on directory blocks, a NULL value returned from ext3_bread() means a
hole, which cannot exist into a directory inode. It can pass undetected after a
fix in an uninitialized error variable.

The (now) initialized variable into ext3_getblk() may lead to a zero'ed return
value of ext3_bread() to its callers, which can make the caller do not detect
the hole in the directory inode.

This patch creates a new wrapper function ext3_dir_bread() which checks for
holes properly, reports error, and returns EIO in that case.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2012-10-09 23:21:42 +02:00
..
acl.c userns: Convert extN to support kuids and kgids in posix acls 2012-09-18 01:01:36 -07:00
acl.h fs: take the ACL checks to common code 2011-07-25 14:30:23 -04:00
balloc.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-10-01 09:06:36 -07:00
bitmap.c ext3: use memweight() 2012-07-30 17:25:16 -07:00
dir.c ext3: pass custom EOF to generic_file_llseek_size() 2012-07-23 00:00:30 +04:00
ext3_jbd.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
ext3.h Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-05-25 08:14:59 -07:00
file.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
fsync.c ext3: Check return value of blkdev_issue_flush() 2012-07-09 23:40:46 +02:00
hash.c ext3: return 32/64-bit dir name hash according to usage type 2012-05-15 23:34:39 +02:00
ialloc.c ext3: remove max_debt in find_group_orlov() 2012-04-11 11:12:44 +02:00
inode.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-10-01 09:06:36 -07:00
ioctl.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
Kconfig ext3: default to ordered mode 2010-07-23 12:50:55 +02:00
Makefile
namei.c ext3: ext3_bread usage audit 2012-10-09 23:21:42 +02:00
namei.h ext3: ext3_bread usage audit 2012-10-09 23:21:42 +02:00
resize.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
super.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-10-04 09:14:01 -07:00
symlink.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr_security.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr_trusted.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr_user.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr.h fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00