diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-28 19:42:28 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-28 19:42:28 -0700 |
commit | f6a23f756867cf60f74309f922232d1c0285f854 (patch) | |
tree | 6fd2be87b93b7938f64256f5fa561492f1add0cf | |
parent | 48a37308973ee679768bc1aaa81313c36e2ec632 (diff) | |
download | longterm-queue-2.6.33-f6a23f756867cf60f74309f922232d1c0285f854.tar.gz |
.33 patches
-rw-r--r-- | queue-2.6.33/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch | 31 | ||||
-rw-r--r-- | queue-2.6.33/ecryptfs-unlock-page-in-write_begin-error-path.patch | 34 | ||||
-rw-r--r-- | queue-2.6.33/series | 2 |
3 files changed, 67 insertions, 0 deletions
diff --git a/queue-2.6.33/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch b/queue-2.6.33/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch new file mode 100644 index 0000000..1a780c3 --- /dev/null +++ b/queue-2.6.33/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch @@ -0,0 +1,31 @@ +From 1821df040ac3cd6a57518739f345da6d50ea9d3f Mon Sep 17 00:00:00 2001 +From: Roberto Sassu <roberto.sassu@polito.it> +Date: Thu, 17 Mar 2011 12:48:50 +0100 +Subject: eCryptfs: ecryptfs_keyring_auth_tok_for_sig() bug fix + +From: Roberto Sassu <roberto.sassu@polito.it> + +commit 1821df040ac3cd6a57518739f345da6d50ea9d3f upstream. + +The pointer '(*auth_tok_key)' is set to NULL in case request_key() +fails, in order to prevent its use by functions calling +ecryptfs_keyring_auth_tok_for_sig(). + +Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> +Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + fs/ecryptfs/keystore.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/ecryptfs/keystore.c ++++ b/fs/ecryptfs/keystore.c +@@ -1542,6 +1542,7 @@ int ecryptfs_keyring_auth_tok_for_sig(st + printk(KERN_ERR "Could not find key with description: [%s]\n", + sig); + rc = process_request_key_err(PTR_ERR(*auth_tok_key)); ++ (*auth_tok_key) = NULL; + goto out; + } + (*auth_tok) = ecryptfs_get_key_payload_data(*auth_tok_key); diff --git a/queue-2.6.33/ecryptfs-unlock-page-in-write_begin-error-path.patch b/queue-2.6.33/ecryptfs-unlock-page-in-write_begin-error-path.patch new file mode 100644 index 0000000..63fc53d --- /dev/null +++ b/queue-2.6.33/ecryptfs-unlock-page-in-write_begin-error-path.patch @@ -0,0 +1,34 @@ +From 50f198ae16ac66508d4b8d5a40967a8507ad19ee Mon Sep 17 00:00:00 2001 +From: Tyler Hicks <tyhicks@linux.vnet.ibm.com> +Date: Wed, 9 Mar 2011 11:49:13 -0600 +Subject: eCryptfs: Unlock page in write_begin error path + +From: Tyler Hicks <tyhicks@linux.vnet.ibm.com> + +commit 50f198ae16ac66508d4b8d5a40967a8507ad19ee upstream. + +Unlock the page in error path of ecryptfs_write_begin(). This may +happen, for example, if decryption fails while bring the page +up-to-date. + +Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + fs/ecryptfs/mmap.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/fs/ecryptfs/mmap.c ++++ b/fs/ecryptfs/mmap.c +@@ -372,6 +372,11 @@ static int ecryptfs_write_begin(struct f + && (pos != 0)) + zero_user(page, 0, PAGE_CACHE_SIZE); + out: ++ if (unlikely(rc)) { ++ unlock_page(page); ++ page_cache_release(page); ++ *pagep = NULL; ++ } + return rc; + } + diff --git a/queue-2.6.33/series b/queue-2.6.33/series index 9f411ee..7eb1339 100644 --- a/queue-2.6.33/series +++ b/queue-2.6.33/series @@ -8,3 +8,5 @@ sound-oss-opl3-validate-voice-and-channel-indexes.patch mac80211-initialize-sta-last_rx-in-sta_info_alloc.patch ses-show-devices-for-enclosures-with-no-page-7.patch ses-avoid-kernel-panic-when-lun-0-is-not-mapped.patch +ecryptfs-unlock-page-in-write_begin-error-path.patch +ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch |