diff options
| author | 2012-10-02 23:59:23 -0300 | |
|---|---|---|
| committer | 2012-10-09 23:21:42 +0200 | |
| commit | c3d59ad6ab0b3d01c10f326bbc9b089424a3a5c4 (patch) | |
| tree | d2f67c0b1b7a3fd7b601fd85ca7f21f607fdb55b /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | ext3: fix possible non-initialized variable on htree_dirblock_to_tree() (diff) | |
| download | wireguard-linux-c3d59ad6ab0b3d01c10f326bbc9b089424a3a5c4.tar.xz wireguard-linux-c3d59ad6ab0b3d01c10f326bbc9b089424a3a5c4.zip | |
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>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
