[lkml]   [2004]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Fix incorrect kunmap_atomic in pktcdvd
    Peter Osterlund <> wrote:
    > Andrew Morton <> writes:
    > > Peter Osterlund <> wrote:
    > > >
    > > > The pktcdvd driver uses kunmap_atomic() incorrectly. The function is
    > > > supposed to take an address as the first parameter, but the pktcdvd
    > > > driver passed a page pointer. Thanks to Douglas Gilbert and Jens Axboe
    > > > for discovering this.
    > >
    > > You're about the 7,000th person to make that mistake. We really should
    > > catch it via typechecking but the code's really lame and nobody ever got
    > > around to rotorooting it.
    > Why was the interface made different from kmap()/kunmap() in the first
    > place? Wouldn't it have made more sense to let kunmap_atomic() take a
    > page pointer as the first parameter?

    No, kmap-atomic() maps a single page into the CPU's address space by making
    a pte point at the page. To unmap that page we need to get at the pte, not
    at the page. If kmap_atomic() were to take a pageframe address we'd need
    to search the whole fixmap space for the corresponding page - a reverse

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

     \ /
      Last update: 2005-03-22 14:07    [W:0.029 / U:55.748 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site