Re: using remap_page_range()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2003-06-11 at 06:06, Biswaranjan wrote:
> hi..
> 
> we are trying to implement double buffering in the following 
> away.
> 
> we have two buffers in the kernel..
> the user is able to mmap one buffer to the user space
> using mmap() system call.
> we have used remap_page_range() to setup the mapping.with one 
> buffer.
> this is working fine
> 
> sometimes it may be necessary for the kernel to map the other 
> buffer
> to the user space (to the same virtual address) so that the 
> orginal mapped buffer can be dma transferred.
> 
> to perform this new mapping we have again used 
> remap_page_range()
> 
> but the kernel oops'es when this is done..as follows..
> 
> Jun 11 15:26:50 EMB kernel: forget_pte: old mapping existed!
> Jun 11 15:26:50 EMB kernel: ------------[ cut here ]------------
> Jun 11 15:26:50 EMB kernel: kernel BUG at memory.c:461!
> Jun 11 15:26:50 EMB kernel: invalid operand: 0000
> .
> 
> i think we are supposed to remove the old mappings
> with zap_page_range()..but since we are compiling as a module
> this function is inaccessible (dont know why)

I believe the zap_page_range() will do the trick.  As for it
not being exported, yeah, that would be a pain.  You could either
1) export it in your own kernel(s), or 2) submit a patch to have
it exported in official releases.  You'll still need to do #1 in
the short term.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux