]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.38 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 29 Mar 2011 02:07:48 +0000 (19:07 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 29 Mar 2011 02:07:48 +0000 (19:07 -0700)
queue-2.6.38/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch [new file with mode: 0644]
queue-2.6.38/ecryptfs-unlock-page-in-write_begin-error-path.patch [new file with mode: 0644]
queue-2.6.38/series

diff --git a/queue-2.6.38/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch b/queue-2.6.38/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch
new file mode 100644 (file)
index 0000000..c8cd2ef
--- /dev/null
@@ -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
+@@ -1563,6 +1563,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.38/ecryptfs-unlock-page-in-write_begin-error-path.patch b/queue-2.6.38/ecryptfs-unlock-page-in-write_begin-error-path.patch
new file mode 100644 (file)
index 0000000..2a843c2
--- /dev/null
@@ -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
+@@ -374,6 +374,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;
+ }
index 1c68f9056a193b607f3487aa175d6624526b861c..345839aa7fcf3cb5652059c584cd93003ea16ee1 100644 (file)
@@ -12,3 +12,5 @@ ses-show-devices-for-enclosures-with-no-page-7.patch
 ses-avoid-kernel-panic-when-lun-0-is-not-mapped.patch
 pci-acpi-report-aspm-support-to-bios-if-not-disabled-from-command-line.patch
 x86-64-mm-put-early-page-table-high.patch
+ecryptfs-unlock-page-in-write_begin-error-path.patch
+ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch