From: Martin Maletinsky <maletinsky@scs.ch>
To: linux-mm@kvack.org, kernelnewbies@nl.linux.org
Subject: question on mmput()
Date: Mon, 07 Oct 2002 17:33:48 +0200 [thread overview]
Message-ID: <3DA1A95C.AE5076D5@scs.ch> (raw)
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/
reply other threads:[~2002-10-07 15:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DA1A95C.AE5076D5@scs.ch \
--to=maletinsky@scs.ch \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox