]> 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.
authorKonstantin Belousov <kib@FreeBSD.org>
Fri, 13 Nov 2020 09:42:32 +0000 (09:42 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Fri, 13 Nov 2020 09:42:32 +0000 (09:42 +0000)
commit441eb16a953ac93d356e0cda28b45cb66ad70bcc
tree4bc0bfc1ebefb9729a636334f5745ba23eb9c2e3
parent7cde2ec4fdb20cac4f1f1fff1a8604028b36b42c
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