fs/9p: Add fid before dentry instantiation
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 25 Jul 2011 18:06:32 +0000 (18:06 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:40:21 +0000 (11:40 -0700)
commite279cdca3ca67dcd8e24051629163f9d5d838894
treedeb27c24fd4fc7885eed28346dfd756006d9b03d
parent3cba74d538d72f649c036df893c2e9895bcfc9df
fs/9p: Add fid before dentry instantiation

commit 5441ae5eb3614d3c28f77073370738a2820c88e4 upstream.

d_instantiate marks the dentry positive. So a parallel lookup and mkdir of
the directory can find dentry that doesn't have fid attached. This can result
in both the code path doing v9fs_fid_add which results in v9fs_dentry leak.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c