[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tmpfs: now working

From: Neal H Walfield
Subject: Re: [PATCH] tmpfs: now working
Date: Wed, 2 May 2001 20:28:40 +0200
User-agent: Mutt/1.3.15i

> 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.

Attachment: pgpuOYb2cJC98.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]