android_kernel_google_msm/fs/hpfs
Al Viro d5c20298b6 hpfs: deadlock and race in directory lseek()
commit 31abdab9c1 upstream.

For one thing, there's an ABBA deadlock on hpfs fs-wide lock and i_mutex
in hpfs_dir_lseek() - there's a lot of methods that grab the former with
the caller already holding the latter, so it must take i_mutex first.

For another, locking the damn thing, carefully validating the offset,
then dropping locks and assigning the offset is obviously racy.

Moreover, we _must_ do hpfs_add_pos(), or the machinery in dnode.c
won't modify the sucker on B-tree surgeries.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-13 11:51:18 -08:00
..
alloc.c
anode.c
buffer.c
dentry.c
dir.c hpfs: deadlock and race in directory lseek() 2014-02-13 11:51:18 -08:00
dnode.c
ea.c
file.c hpfs: fix warnings when the filesystem fills up 2013-12-20 07:34:21 -08:00
hpfs.h
hpfs_fn.h
inode.c
Kconfig
Makefile
map.c hpfs: better test for errors 2013-07-13 11:03:40 -07:00
name.c
namei.c
super.c hpfs: better test for errors 2013-07-13 11:03:40 -07:00