lkml.org 
[lkml]   [2008]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix kunmap() argument in sg_miter_stop
On Mon, Nov 17 2008, Linus Torvalds wrote:
>
>
> On Mon, 17 Nov 2008, Jens Axboe wrote:
> >
> > Any opinions on the kunmap/kunmap_atomic pointer checking? It's a bit
> > ugly that we have to enforce a void * rule for kunmap_atomic(),
>
> I don't think that's a "bit ugly". I think it's unacceptable.
>
> Making sure we pass in "struct page" to kunmap() sounds good, but the
> kunmap_atomic() part just sounds insane.

It's been the primary source of bugs that I have seen. The xen and sg
iter bug were kunmap() variants though, but otherwise I've mostly seen
the opposite. But it is ugly, no doubt about it. I can't think of a
better way to attempt to warn about it though, so if you really dislike
it I'll just drop the _atomic() bits.

--
Jens Axboe



\
 
 \ /
  Last update: 2008-11-17 19:31    [from the cache]
©2003-2011 Jasper Spaans