[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.00.1105201535530.1899@sister.anvils>
Date: Fri, 20 May 2011 15:47:33 -0700 (PDT)
From: Hugh Dickins <hughd@...gle.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Witold Baryluk <baryluk@....if.uj.edu.pl>,
Nitin Gupta <ngupta@...are.org>,
Konstantin Khlebnikov <khlebnikov@...nvz.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCH] 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@....if.uj.edu.pl>
Signed-off-by: Hugh Dickins <hughd@...gle.com>
Cc: stable@...nel.org
---
mm/shmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- 2.6.39/mm/shmem.c 2011-05-18 21:06:34.000000000 -0700
+++ linux/mm/shmem.c 2011-05-20 13:57:20.778870967 -0700
@@ -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:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists