diff options
author | Tyler Hicks <tyhicks@canonical.com> | 2012-05-22 15:09:50 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-21 09:28:01 -0700 |
commit | 4fd441539be925bf3cbbfe88f9371317a952529b (patch) | |
tree | 0dacbbb315640ccf289604fa4384643f85b7ed23 /fs/pipe.c | |
parent | 8abffa895c8a6c6079e93db68f5eb5e4a2332a82 (diff) |
eCryptfs: Unlink lower inode when ecryptfs_create() fails
commit 8bc2d3cf612994a960c2e8eaea37f6676f67082a upstream.
ecryptfs_create() creates a lower inode, allocates an eCryptfs inode,
initializes the eCryptfs inode and cryptographic metadata attached to
the inode, and then writes the metadata to the header of the file.
If an error was to occur after the lower inode was created, an empty
lower file would be left in the lower filesystem. This is a problem
because ecryptfs_open() refuses to open any lower files which do not
have the appropriate metadata in the file header.
This patch properly unlinks the lower inode when an error occurs in the
later stages of ecryptfs_create(), reducing the chance that an empty
lower file will be left in the lower filesystem.
https://launchpad.net/bugs/872905
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Cc: John Johansen <john.johansen@canonical.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/pipe.c')
0 files changed, 0 insertions, 0 deletions