[lkml]   [2012]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 1/2] uio: add warning to documentation
The documentation has no clear statement to the POSIX 1003.1 mmap()
feature, wich allows open(), mmap(), close() while the mmaped pointer is valid.
The release() hook inveigled driver programmer to activate owermanagement
functuonality in the release hook. This may harm.

Signed-off-by: Benedikt Spranger <>
Documentation/DocBook/uio-howto.tmpl | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index ac3d001..59a886d 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -499,8 +499,13 @@ device is actually used.
<varname>int (*release)(struct uio_info *info, struct inode *inode)
</varname>: Optional. If you define your own
-<function>open()</function>, you will probably also want a custom
+<function>release()</function>, you will probably also want a custom
<function>release()</function> function.
+</para><para>CAVE: The release hook may be processed, even if a mmap is aktive.
+Disabling clocks or other powermanagement functionality may cause a system
+crash, hangup or other unwanted sideeffects.
+</para><para><emphasis>The mmap() function shall add an extra reference to the file associated with the file descriptor fildes which is not removed by a subsequent close() on that file descriptor. This reference shall be removed when there are no more mappings to the file.</emphasis></para><para>
+<link xlink:href="">IEEE Std 1003.1, 2004 Edition, mmap()</link>


 \ /
  Last update: 2012-12-12 00:41    [W:0.072 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site