svn commit: r292621 - head/sys/fs/devfs
Bruce Evans
brde at optusnet.com.au
Tue Dec 22 21:48:27 UTC 2015
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
More information about the svn-src-head
mailing list