lkml.org 
[lkml]   [2002]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel vaddr -> struct page
Eric Barton wrote:
> Hi,
>
> I'm trying to turn a kernel virtual address into a struct page that I can
> then pass to tcp_sendpage().
>
> The kernel virtual address could be {kmalloc(),vmalloc(),kmap()}-ed memory,
> and I guarantee that this memory will not be {kfree(),vfree(),kunmap()}-ed
> until the socket has done with the page (i.e. all the data has been acked).
>
> I'd have thought that vmalloc_to_page(kvaddr) should give me a page I could
> use, since it is walking the page tables to find the pte for 'kvaddr', and
> checking that the physical page is present.
>
> However I find I'm sending garbage when I use this method.
>
> Can anyone help me understand?
>

virt_to_page()

--
Brian Gerst

-
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:30    [W:2.470 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site