lkml.org 
[lkml]   [2011]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[001/165] tmpfs: fix highmem swapoff crash regression
    2.6.39-stable review patch.  If anyone has any objections, please let us know.

    ------------------
    Content-Length: 1204
    Lines: 45

    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:



    \
     
     \ /
      Last update: 2011-06-01 10:19    [W:0.020 / U:120.456 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site