]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - sys/kern/subr_syscall.c
Allow some VOPs to return ERELOOKUP to indicate VFS operation restart at top level.
authorkib <kib@FreeBSD.org>
Fri, 13 Nov 2020 09:42:32 +0000 (09:42 +0000)
committerkib <kib@FreeBSD.org>
Fri, 13 Nov 2020 09:42:32 +0000 (09:42 +0000)
commit8af72456828db0c1b52c8b374c7773597bb53605
tree4bc0bfc1ebefb9729a636334f5745ba23eb9c2e3
parent808c8ec18b5d351dc95e895bde01cd30648b216d
Allow some VOPs to return ERELOOKUP to indicate VFS operation restart at top level.

Restart syscalls and some sync operations when filesystem indicated
ERELOOKUP condition, mostly for VOPs operating on metdata.  In
particular, lookup results cached in the inode/v_data is no longer
valid and needs recalculating.  Right now this should be nop.

Assert that ERELOOKUP is catched everywhere and not returned to
userspace, by asserting that td_errno != ERELOOKUP on syscall return
path.

In collaboration with: pho
Reviewed by: mckusick (previous version), markj
Tested by: markj (syzkaller), pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D26136
sys/kern/subr_syscall.c
sys/kern/uipc_usrreq.c
sys/kern/vfs_subr.c
sys/kern/vfs_syscalls.c