diff options
author | Hugh Dickins <hughd@google.com> | 2011-05-20 18:47:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-20 19:23:19 -0400 |
commit | e6c9366b2adb52cba64b359b3050200743c7568c (patch) | |
tree | 8e092d9b865734f31116583a2db20971e1c352ee /mm | |
parent | 6de06f313a65d0ecabf055e708d082002b568866 (diff) |
tmpfs: fix highmem swapoff crash regression
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>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/shmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index dfc7069102ee..ba4ad28b7db6 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -916,11 +916,12 @@ static int shmem_unuse_inode(struct shmem_inode_info *info, swp_entry_t entry, s | |||
916 | if (size > ENTRIES_PER_PAGE) | 916 | if (size > ENTRIES_PER_PAGE) |
917 | size = ENTRIES_PER_PAGE; | 917 | size = ENTRIES_PER_PAGE; |
918 | offset = shmem_find_swp(entry, ptr, ptr+size); | 918 | offset = shmem_find_swp(entry, ptr, ptr+size); |
919 | shmem_swp_unmap(ptr); | ||
919 | if (offset >= 0) { | 920 | if (offset >= 0) { |
920 | shmem_dir_unmap(dir); | 921 | shmem_dir_unmap(dir); |
922 | ptr = shmem_swp_map(subdir); | ||
921 | goto found; | 923 | goto found; |
922 | } | 924 | } |
923 | shmem_swp_unmap(ptr); | ||
924 | } | 925 | } |
925 | } | 926 | } |
926 | lost1: | 927 | lost1: |