eCryptfs: Prevent file create race condition
authorTyler Hicks <tyhicks@canonical.com>
Mon, 21 Nov 2011 23:31:02 +0000 (17:31 -0600)
committerTyler Hicks <tyhicks@canonical.com>
Wed, 23 Nov 2011 21:39:38 +0000 (15:39 -0600)
The file creation path prematurely called d_instantiate() and
unlock_new_inode() before the eCryptfs inode info was fully
allocated and initialized and before the eCryptfs metadata was written
to the lower file.

This could result in race conditions in subsequent file and inode
operations leading to unexpected error conditions or a null pointer
dereference while attempting to use the unallocated memory.

https://launchpad.net/bugs/813146

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Cc: stable@kernel.org

No differences found