lkml.org 
[lkml]   [2002]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 6/12] hold atomic kmaps across generic_file_read
    On Fri, 9 Aug 2002 18:33:09 -0700 (PDT)
    Linus Torvalds <torvalds@transmeta.com> wrote:

    > repeat:
    > kmap_atomic(..); // this increments preempt count
    > nr = copy_from_user(..);

    Please please please use a different name for "I know I'm not preemptible but
    I can handle it" or a flag or something.

    That leaves us with the possibility of a BUG() in the "normal" copy_to/from_user
    for all those "I'm holding a spinlock while copying to userspace wheeee!" bugs.
    Very common mistake for new kernel authors.

    With the preempt count we have an easy way of detecting this at runtime: I'd
    like to keep that.

    Rusty.
    --
    there are those who do and those who hang on and you don't see too
    many doers quoting their contemporaries. -- Larry McVoy
    -
    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:27    [W:2.065 / U:0.240 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site