diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-05-19 10:12:41 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-05-19 10:12:41 -0700 |
commit | 8d0bc2b456103a34c11e01305cd1aed1cde579e5 (patch) | |
tree | 5e1e6ad55cc9e2b5c5617f6f320114b8cff9e3f3 /fs/cachefiles/security.c | |
parent | 30ba3ead05763b172acaa65ae1be71af2a878940 (diff) | |
parent | e40152ee1e1c7a63f4777791863215e3faa37a86 (diff) |
Merge commit 'v2.6.34' into next
Diffstat (limited to 'fs/cachefiles/security.c')
-rw-r--r-- | fs/cachefiles/security.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cachefiles/security.c b/fs/cachefiles/security.c index b5808cdb223..039b5011d83 100644 --- a/fs/cachefiles/security.c +++ b/fs/cachefiles/security.c @@ -77,6 +77,8 @@ static int cachefiles_check_cache_dir(struct cachefiles_cache *cache, /* * check the security details of the on-disk cache * - must be called with security override in force + * - must return with a security override in force - even in the case of an + * error */ int cachefiles_determine_cache_security(struct cachefiles_cache *cache, struct dentry *root, @@ -99,6 +101,8 @@ int cachefiles_determine_cache_security(struct cachefiles_cache *cache, * which create files */ ret = set_create_files_as(new, root->d_inode); if (ret < 0) { + abort_creds(new); + cachefiles_begin_secure(cache, _saved_cred); _leave(" = %d [cfa]", ret); return ret; } |