Re: RFC: BSD system call revoke?

Alexander Viro (viro@math.psu.edu)
Thu, 24 Jun 1999 11:24:27 -0400 (EDT)


On Thu, 24 Jun 1999, Stephen C. Tweedie wrote:

> I'll redo the fdset for 2.3.current to do this right if nobody else has
> already started it.

If you will do that - fine. I did the following:
1. rwlock on files_struct
2. fget grabs the lock (read), picks the file, increments f_count and
releases the lock
3. frip grabs the lock (write), picks the file, puts NULL in its place,
releases the lock and returns the file.
4. fcheck needs to be protected by the same lock (read) for the period
when you are using its result.
5. fd_install() doesn't grab the lock, but it can be changed (will be
needed during the copy to expanded area).
6. manipulations with bitmasks are using the same lock (write).

I'm killing all explicit accesses to ->files->fd[foo], so if you want to
go for sparse arrays it will not be too hard. Comments?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/