Date: Wed, 23 Dec 2015 08:26:46 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Konstantin Belousov <kib@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r292621 - head/sys/fs/devfs Message-ID: <20151223080243.H993@besplex.bde.org> In-Reply-To: <201512222022.tBMKMH80041925@repo.freebsd.org> References: <201512222022.tBMKMH80041925@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 22 Dec 2015, Konstantin Belousov wrote: > Log: > Keep devfs mount locked for the whole duration of the devfs_setattr(), > and ensure that our dirent is instantiated. > > Reported and tested by: bde > Sponsored by: The FreeBSD Foundation > MFC after: 1 week Thanks. This is part of fixing revoke(2). Even stat() doesn't work right when it races revoke(). setattr() is used surprisingly often since it is used for opening with O_TRUNC. open() racing with revoke() caused problems doing the truncation even though truncation is a no-op for devfs. Truncation is not atomic for opening with O_TRUNC. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151223080243.H993>