linux/fs/ufs
Jan Kara 514d748f69 ufs: Fix possible deadlock when looking up directories
Commit e4502c63f5 (ufs: deal with nfsd/iget races) made ufs
create inodes with I_NEW flag set. However ufs_mkdir() never cleared
this flag. Thus if someone ever tried to lookup the directory by inode
number, he would deadlock waiting for I_NEW to be cleared. Luckily this
mostly happens only if the filesystem is exported over NFS since
otherwise we have the inode attached to dentry and don't look it up by
inode number. In rare cases dentry can get freed without inode being
freed and then we'd hit the deadlock even without NFS export.

Fix the problem by clearing I_NEW before instantiating new directory
inode.

Fixes: e4502c63f5
Reported-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-06-16 02:08:12 -04:00
..
balloc.c fs/ufs: restore s_lock mutex 2015-06-16 02:07:38 -04:00
cylinder.c
dir.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
file.c make new_sync_{read,write}() static 2015-04-11 22:29:40 -04:00
ialloc.c fs/ufs: restore s_lock mutex 2015-06-16 02:07:38 -04:00
inode.c fs/ufs: revert "ufs: fix deadlocks introduced by sb mutex merge" 2015-06-14 11:31:51 -04:00
Kconfig fs/ufs: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:39:06 -08:00
Makefile fs/ufs: convert printk to pr_foo() 2014-08-08 15:57:21 -07:00
namei.c ufs: Fix possible deadlock when looking up directories 2015-06-16 02:08:12 -04:00
super.c fs/ufs: restore s_lock mutex 2015-06-16 02:07:38 -04:00
swab.h
symlink.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
truncate.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
ufs_fs.h fs/ufs: get rid of write_super 2012-07-22 23:58:16 +04:00
ufs.h fs/ufs: restore s_lock mutex 2015-06-16 02:07:38 -04:00
util.c fs: ufs: remove cast for kmalloc return value 2013-03-18 14:15:58 +01:00
util.h ufs: use little-endian bitops 2011-03-23 19:46:19 -07:00