Hi,
following scenario:
Two linux systems connected via PCI.
I'd like to write a driver, which allows to map memory from the remote
system into local user space and vice versa.
This works quite well utilizing mmap and respective vma_ops.
I do have one problem though. When the buffer on the remote side gets
destroyed, I'd like to remove the mappings from local user space into this
buffer (I do prefer a segfaulting application over an application writing
into "I don't know where").
Under kernel 2.4.x I used "do_munmap()" in protection of "mm->mmap_sem"
and it seemed to work quite well for me.
Now using kernel 2.6.x (I tested 2.6.8 and 2.6.15) this seemingly doesn't
work anymore, because I do end up with a crash, when trying to manually
unmap the memory.
Is there any safe way to "trigger munmap()" from inside the kernel?
Best regards,
Andreas