lkml.org 
[lkml]   [2003]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 2] Little fixes to previous futex patch
    Patch name: futex-nonlinear-2.6.0-test4-02jl
    Depends on: futex-fixes-2.6.0-test4-01jl

    This fixes a couple of bugs in the previous patch:

    1. A typo in futex.c. It affects the FUTEX_REQUEUE operation,
    which is a fairly recent addition.

    2. VM_NONLINEAR would not be set under some conditions when it should be.
    The bug only affected futexes on non-linear shared mappings.

    Enjoy,
    -- Jamie


    diff -urN --exclude-from=dontdiff futex1-2.6.0-test4/kernel/futex.c futex2-2.6.0-test4/kernel/futex.c
    --- futex1-2.6.0-test4/kernel/futex.c 2003-09-03 12:48:59.000000000 +0100
    +++ futex2-2.6.0-test4/kernel/futex.c 2003-09-03 12:56:03.000000000 +0100
    @@ -224,7 +224,7 @@

    down_read(&current->mm->mmap_sem);

    - ret = __get_page_keys(uaddr2 - offset1, keys1);
    + ret = __get_page_keys(uaddr1 - offset1, keys1);
    if (unlikely(ret != 0))
    goto out;
    ret = __get_page_keys(uaddr2 - offset2, keys2);
    diff -urN --exclude-from=dontdiff futex1-2.6.0-test4/mm/fremap.c futex2-2.6.0-test4/mm/fremap.c
    --- futex1-2.6.0-test4/mm/fremap.c 2003-09-03 12:29:36.000000000 +0100
    +++ futex2-2.6.0-test4/mm/fremap.c 2003-09-03 13:02:35.000000000 +0100
    @@ -153,9 +153,9 @@
    end > start && start >= vma->vm_start &&
    end <= vma->vm_end) {

    - if (start != vma->vm_start || end != vma->vm_end)
    - vma->vm_flags |= VM_NONLINEAR;
    - else
    + vma->vm_flags |= VM_NONLINEAR;
    + if (start == vma->vm_start && end == vma->vm_end &&
    + pgoff == vma->vm_pgoff)
    vma->vm_flags &= ~VM_NONLINEAR;

    err = vma->vm_ops->populate(vma, start, size, vma->vm_page_prot,
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 13:48    [W:4.525 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site