lkml.org 
[lkml]   [2000]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: Copy_to_user() and locks.
    Hi,

    On Tue, 8 Feb 2000 15:46:34 -0500 (EST), "Richard B. Johnson"
    <root@chaos.analogic.com> said:

    > You must not copy_to_user() under a lock. This is because the
    > user's pages may not be in memory and the kernel needs to page-
    > fault.

    > Unfortunately, this often means that you have to copy twice, double
    > buffer. However, a typical PC nowdays can copy over 800 megabytes per
    > second.

    Correct. However, what you _can_ do is to allocate kernel memory and
    access that from your driver, and to map that same memory into user
    space so that it is visible from a user process without copying.

    --Stephen

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:56    [W:0.080 / U:0.064 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site