]> git.baikalelectronics.ru Git - kernel.git/commit
udf: Fix memory corruption when fs mounted with noadinicb option
authorJan Kara <jack@ghost.suse.cz>
Tue, 6 May 2008 16:26:17 +0000 (18:26 +0200)
committerJan Kara <jack@suse.cz>
Wed, 7 May 2008 07:49:52 +0000 (09:49 +0200)
commit3f4abf5cf18d02e548ba96ac93162b75d2de8fdd
tree45f0ce3a176c3562ff308189ced71ebb6f0a1110
parent79f8b889ddfe5cdaa361d41574c085ab7e77db24
udf: Fix memory corruption when fs mounted with noadinicb option

When UDF filesystem is mounted with noadinicb mount option, it
happens that we extend an empty directory with a block. A code in
udf_add_entry() didn't count with this possibility and used
uninitialized data leading to memory and filesystem corruption.
Add a check whether file already has some extents before operating
on them.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/namei.c