<div dir="ltr">Hi,<div><br></div><div style>I've read about the possible bugs. </div><div style>About the combination between mmap and mandatory locks:</div><div style>of course the mapping of memory is causing troubles when a mandatory lock is set. The mapped region should or forward the lock to the new memory location (where remapped) or the mmap should be denied, unless the locking allows it (when the mandatory lock is read, allow read access, if a write lock, deny all others, also mmap). The first is causing too much overhead, so the second is in my opinion the best option.</div>
<div style><br></div><div style>Second, when a write is allowed, and a read lock is set (which is possible according to </div><div style><br></div><div style><a href="http://kernel.org/doc/Documentation/filesystems/mandatory-locking.txt">http://kernel.org/doc/Documentation/filesystems/mandatory-locking.txt</a><br>
</div><div style><br></div><div style>then the implementation is not right.</div><div style><br></div><div style>Like other operations which require exclusive access to a region of a file, like writes do, denying other writes to the same region at the same moment, I guess this locking should also behave like that. If this isn't the case (where theoretically it is possible that writes are done when a read lock is set) then there is something wrong.</div>
<div style><br></div><div style>Stef</div><div style><br></div><div style><br></div><div class="gmail_extra"><br><br></div></div>