Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2015 12:47:27 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-drivers@freebsd.org, Leonardo Fogel <leonardofogel@yahoo.com.br>
Subject:   Re: Race conditions
Message-ID:  <20150903094727.GD2072@kib.kiev.ua>
In-Reply-To: <1619676.EuPFulsFRT@ralph.baldwin.cx>
References:  <1439923294.98963.YahooMailBasic@web120801.mail.ne1.yahoo.com> <17365161.8JflB5H0LB@ralph.baldwin.cx> <20150902135922.GZ2072@kib.kiev.ua> <1619676.EuPFulsFRT@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 02, 2015 at 10:59:12AM -0700, John Baldwin wrote:
> If we allow a cdevsw to override how devname works, then that would probably
> be sufficient on its own.  I don't think you would need to change the
> /dev/tapX devices at all.  The cdevpriv for /dev/tap desciptors would have a
> reference to the /dev/tapX device it is using and return that device's name
> in the devname override.
You mean, the consumers of tap use fdevname(3), not devname(3) ?  Since
for devname(), there is no access to cdevpriv.

> 
> Another option that I had started to play with previously is to let devices
> auto-created by /dev/tap set an internal 'destroy-on-close' flag.  That
> seems a bit more heavyweight, but it might also be simpler to implement?

Could you, please, clarify, how this would help to handle the race at
open ?



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