> Diskfs_drop_node is called only when there are no outstanding
> references to the file: including memory objects.  If there is a
> memory object reference of any kind, and diskfs_drop_node is being
> called, you have a serious bug.  

This is wrong.  Consider mmap;  By SUSv2, we are allowed to:

        fd = open (foo, ...);
        data = mmap (fd, ...);
        close (fd);

        *data = ...;

As we implement mmap by passing a reference to a memory object port to
the user, we never know when all of the references are gone.

> I would just bzero the region by hand if necessary,

True, however, consider that we do not know what the real size of the
memory object is.  We only know what the user have told us.  A user can
always fake us out by mapping in more than he said he was going to.

> (Ideally we'd ask the default pager to revoke the pages from the
> kernel and provide empty pages on the next pagein fault.)

Of course, this requires an extension to the default_memory_* protocol.

PGP signature

Reply via email to