[systemd-devel] Offtopic question.
Stef Bon
stefbon at gmail.com
Fri Jan 4 01:16:54 PST 2013
Hi,
I've read about the possible bugs.
About the combination between mmap and mandatory locks:
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.
Second, when a write is allowed, and a read lock is set (which is possible
according to
http://kernel.org/doc/Documentation/filesystems/mandatory-locking.txt
then the implementation is not right.
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.
Stef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130104/76fca303/attachment.html>
More information about the systemd-devel
mailing list