summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-05-21 14:44:04 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-21 14:44:04 -0700
commit2cece29545bd9841fedac6b59731952839580ef3 (patch)
tree665cb2c682a5f9375c05f52ddef4ff902ec8e1f4
parentcf7545ccaa008bf063012c48f8654d84b25a6952 (diff)
downloadstable-queue-2cece29545bd9841fedac6b59731952839580ef3.tar.gz
.39 patches
-rw-r--r--queue-2.6.39/series1
-rw-r--r--queue-2.6.39/tmpfs-fix-highmem-swapoff-crash-regression.patch49
2 files changed, 50 insertions, 0 deletions
diff --git a/queue-2.6.39/series b/queue-2.6.39/series
new file mode 100644
index 0000000000..d0157b779b
--- /dev/null
+++ b/queue-2.6.39/series
@@ -0,0 +1 @@
+tmpfs-fix-highmem-swapoff-crash-regression.patch
diff --git a/queue-2.6.39/tmpfs-fix-highmem-swapoff-crash-regression.patch b/queue-2.6.39/tmpfs-fix-highmem-swapoff-crash-regression.patch
new file mode 100644
index 0000000000..953159326d
--- /dev/null
+++ b/queue-2.6.39/tmpfs-fix-highmem-swapoff-crash-regression.patch
@@ -0,0 +1,49 @@
+From e6c9366b2adb52cba64b359b3050200743c7568c Mon Sep 17 00:00:00 2001
+From: Hugh Dickins <hughd@google.com>
+Date: Fri, 20 May 2011 15:47:33 -0700
+Subject: tmpfs: fix highmem swapoff crash regression
+
+From: Hugh Dickins <hughd@google.com>
+
+commit e6c9366b2adb52cba64b359b3050200743c7568c upstream.
+
+Commit 778dd893ae78 ("tmpfs: fix race between umount and swapoff")
+forgot the new rules for strict atomic kmap nesting, causing
+
+ WARNING: at arch/x86/mm/highmem_32.c:81
+
+from __kunmap_atomic(), then
+
+ BUG: unable to handle kernel paging request at fffb9000
+
+from shmem_swp_set() when shmem_unuse_inode() is handling swapoff with
+highmem in use. My disgrace again.
+
+See
+ https://bugzilla.kernel.org/show_bug.cgi?id=35352
+
+Reported-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
+Signed-off-by: Hugh Dickins <hughd@google.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/shmem.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/mm/shmem.c
++++ b/mm/shmem.c
+@@ -916,11 +916,12 @@ static int shmem_unuse_inode(struct shme
+ if (size > ENTRIES_PER_PAGE)
+ size = ENTRIES_PER_PAGE;
+ offset = shmem_find_swp(entry, ptr, ptr+size);
++ shmem_swp_unmap(ptr);
+ if (offset >= 0) {
+ shmem_dir_unmap(dir);
++ ptr = shmem_swp_map(subdir);
+ goto found;
+ }
+- shmem_swp_unmap(ptr);
+ }
+ }
+ lost1: