* question on mmput()
@ 2002-10-07 15:33 Martin Maletinsky
0 siblings, 0 replies; only message in thread
From: Martin Maletinsky @ 2002-10-07 15:33 UTC (permalink / raw)
To: linux-mm, kernelnewbies
Hello,
I write a device driver, that accesses a processes user space memory. In case of an unexpected exit of the user space process (i.e. an exit while the underlying hardware
device is set up to transfer data in to the processes memory), the driver while still need access to the processes (former) memory (e.g. to unlock the pages the driver did
lock, when the transfer was set up).
When the drivers open() file operation is called, it increments the mm_users field in the processes mm_struct, to prevent it from being released, while the driver still
needs to access it.
Once the driver is done with the mm_struct, it should call mmput(), to decrement the usage count, and release the mm_struct if the count drops to 0. Unfortunatly mmput() is
not exported by the kernel (vers. 2.4.18), and can therefore not be used by the driver, which is compiled as a module.
1) Why is mmput() not exported as a symbol?
2) Is there any alternate solution, to properly release the mm_struct once the driver is done with it?
Thanks in advance for any help
with best regards
Martin Maletinsky
P.S. Please put me on CC: in your reply, since I am not in the mailing list.
--
Supercomputing System AG email: maletinsky@scs.ch
Martin Maletinsky phone: +41 (0)1 445 16 05
Technoparkstrasse 1 fax: +41 (0)1 445 16 10
CH-8005 Zurich
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-10-07 15:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-07 15:33 question on mmput() Martin Maletinsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox