Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jul 2008 17:54:51 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Ed Schouten <ed@80386.nl>
Cc:        arch@FreeBSD.ORG
Subject:   Re: Proposal: a revoke() system call
Message-ID:  <20080708174957.M41405@fledge.watson.org>
In-Reply-To: <20080708153632.GI14567@hoeg.nl>
References:  <9484951.340521215467447990.JavaMail.root@vms126.mailsrvcs.net> <20080708001929.E63144@fledge.watson.org> <20080708161802.N89342@fledge.watson.org> <20080708153632.GI14567@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 8 Jul 2008, Ed Schouten wrote:

> I also noticed similar constructs inside the stat() calls, to translate 
> device major/minor numbers. As you can see, some stat() routines call 
> translate_path_major_minor_at() after performing the regular stat() 
> operation. The translate_path_major_minor_at() is implemented by calling 
> kern_openat(). This has three disadvantages:
>
> - It is non-atomic.
>
> - It can only perform the translation on nodes it has O_RDONLY access
>  to. This shouldn't be a big problem, but may cause inconsistencies
>  when users look around in devfs.
>
> - The translation may not always work when the calling process is out of
>  file descriptors.

- Opening a device node can have side effects, such as rewinding tapes,
   raising DTR on serial lines, triggering errors, or denying access to other
   consumers due to exclusive access requirements.

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080708174957.M41405>