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

    On Tue, 8 Feb 2000 15:46:34 -0500 (EST), "Richard B. Johnson"
    <> 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.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

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