lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 66/85] Remove user-triggerable BUG from mpol_to_str
    Date
    From: Greg KH <gregkh@linuxfoundation.org>

    3.4-stable review patch. If anyone has any objections, please let me know.

    ------------------

    From: Dave Jones <davej@redhat.com>

    commit 80de7c3138ee9fd86a98696fd2cf7ad89b995d0a upstream.

    Trivially triggerable, found by trinity:

    kernel BUG at mm/mempolicy.c:2546!
    Process trinity-child2 (pid: 23988, threadinfo ffff88010197e000, task ffff88007821a670)
    Call Trace:
    show_numa_map+0xd5/0x450
    show_pid_numa_map+0x13/0x20
    traverse+0xf2/0x230
    seq_read+0x34b/0x3e0
    vfs_read+0xac/0x180
    sys_pread64+0xa2/0xc0
    system_call_fastpath+0x1a/0x1f
    RIP: mpol_to_str+0x156/0x360

    Signed-off-by: Dave Jones <davej@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    mm/mempolicy.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/mm/mempolicy.c
    +++ b/mm/mempolicy.c
    @@ -2536,7 +2536,7 @@ int mpol_to_str(char *buffer, int maxlen
    break;

    default:
    - BUG();
    + return -EINVAL;
    }

    l = strlen(policy_modes[mode]);



    \
     
     \ /
      Last update: 2012-09-13 04:01    [W:0.052 / U:32.456 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site