[lkml]   [2009]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: [PATCH] mm: Fix dirty_bytes/dirty_background_bytes sysctls on 64bit arches
    On Sun, 1 Feb 2009, Sven Wegener wrote:

    > We need to pass an unsigned long as the minimum, because it gets casted
    > to an unsigned long in the sysctl handler. If we pass an int, we'll
    > access four more bytes on 64bit arches, resulting in a random minimum
    > value.
    > Signed-off-by: Sven Wegener <>

    Acked-by: David Rientjes <>

    You'll also need the following since vm_dirty_bytes is declared as an
    unsigned long. Andrew, can you queue Sven's fix for rc4 with this folded
    into it?

    Signed-off-by: David Rientjes <>
    mm/page-writeback.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/mm/page-writeback.c b/mm/page-writeback.c
    --- a/mm/page-writeback.c
    +++ b/mm/page-writeback.c
    @@ -209,7 +209,7 @@ int dirty_bytes_handler(struct ctl_table *table, int write,
    struct file *filp, void __user *buffer, size_t *lenp,
    loff_t *ppos)
    - int old_bytes = vm_dirty_bytes;
    + unsigned long old_bytes = vm_dirty_bytes;
    int ret;

    ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);

     \ /
      Last update: 2009-02-02 01:29    [W:0.021 / U:27.688 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site