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 HPFS: Fix endianity. Make hpfs work on big-endian machines 2011-05-09 09:04:24 -07:00
anode.c HPFS: Fix endianity. Make hpfs work on big-endian machines 2011-05-09 09:04:24 -07:00
buffer.c HPFS: Remove remaining locks 2011-05-09 09:04:23 -07:00
dentry.c switch hpfs 2011-01-12 20:02:47 -05:00
dir.c hpfs: deadlock and race in directory lseek() 2014-02-13 11:51:18 -08:00
dnode.c HPFS: Fix endianity. Make hpfs work on big-endian machines 2011-05-09 09:04:24 -07:00
ea.c HPFS: Move declaration up, so that there are no out-of-scope pointers 2011-05-09 09:04:24 -07:00
file.c hpfs: fix warnings when the filesystem fills up 2013-12-20 07:34:21 -08:00
hpfs.h HPFS: Fix some unaligned accesses 2011-05-09 09:04:24 -07:00
hpfs_fn.h treewide: use __printf not __attribute__((format(printf,...))) 2011-10-31 17:30:54 -07:00
inode.c filesystems: add set_nlink() 2011-11-02 12:53:43 +01:00
Kconfig HPFS: Make HPFS compile on preempt and SMP 2011-05-09 09:04:23 -07:00
Makefile
map.c hpfs: better test for errors 2013-07-13 11:03:40 -07:00
name.c HPFS: Remove CR/LF conversion option 2011-05-09 09:04:23 -07:00
namei.c switch ->mknod() to umode_t 2012-01-03 22:54:54 -05:00
super.c hpfs: better test for errors 2013-07-13 11:03:40 -07:00