sharing memory between user and kenrel space

From: Joel Jacobson (jjacobson@3WARE.com)
Date: Mon Jun 12 2000 - 20:25:45 EST


I have a driver which allocates some memory, and a user-land process that
mmap()s it through /dev/mem. This seems to work just fine. However, if
that user-land process decides to fork, none of the children seem to be able
to see modifications made by the other children (the parent can see them
all, though).

I've tried calling msync() after the writes and before the reads of the
memory, and it doesn't seem to affect the behavior any.

Am I just missing something, or is fork() creating some sort of bizarro
private memory map that I'm not grasping? pthreads seems to work better (I
have some other problems whose origin I am unsure of, so I can't say if it
"completely" works with pthreads or not).

- j

PS. the mmap() is done before the fork(), if that matters.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:27 EST