r340343 triggers kernel assertion if file is opened with O_BENEATH flag set through symlink

Vladimir Kondratyev vladimir at kondratyev.su
Tue Nov 27 21:54:48 UTC 2018


Following test case triggers assertion after r340343:


#include <fcntl.h>

int
main(int argc, char **argv)
{
        openat(open("/etc", O_RDONLY), "termcap", O_RDONLY | O_BENEATH);
}

It results in:

panic: Assertion (ndp->ni_lcf & NI_LCF_LATCH) != 0 failed at
/usr/src/sys/kern/vfs_lookup.c:182




More information about the freebsd-current mailing list