lkml.org 
[lkml]   [2003]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectPATCH: fix a copy_user return
    diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.6.0-test1/fs/proc/proc_misc.c linux-2.6.0-test1-ac2/fs/proc/proc_misc.c
    --- linux-2.6.0-test1/fs/proc/proc_misc.c 2003-07-10 21:05:28.000000000 +0100
    +++ linux-2.6.0-test1-ac2/fs/proc/proc_misc.c 2003-07-15 17:49:25.000000000 +0100
    @@ -536,7 +536,8 @@
    buf++; p++; count--; read++;
    }
    pnt = (char *)prof_buffer + p - sizeof(unsigned int);
    - copy_to_user(buf,(void *)pnt,count);
    + if(copy_to_user(buf,(void *)pnt,count))
    + return -EFAULT;
    read += count;
    *ppos += read;
    return read;
    -
    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:46    [W:2.213 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site