From owner-svn-src-head@freebsd.org Tue Dec 22 21:48:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50E1EA4FB07; Tue, 22 Dec 2015 21:48:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 1B56F1FBC; Tue, 22 Dec 2015 21:48:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id F2FC4D62764; Wed, 23 Dec 2015 08:26:46 +1100 (AEDT) Date: Wed, 23 Dec 2015 08:26:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r292621 - head/sys/fs/devfs In-Reply-To: <201512222022.tBMKMH80041925@repo.freebsd.org> Message-ID: <20151223080243.H993@besplex.bde.org> References: <201512222022.tBMKMH80041925@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=PfoC/XVd c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=r5tAJkBtihdERt8MAFMA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 21:48:27 -0000 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