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

2018-11-28 Thread Konstantin Belousov
On Wed, Nov 28, 2018 at 10:50:59AM +0100, Peter Holm wrote: > On Wed, Nov 28, 2018 at 01:46:17AM +0200, Konstantin Belousov wrote: > > On Wed, Nov 28, 2018 at 12:54:21AM +0300, Vladimir Kondratyev wrote: > > > Following test case triggers assertion after r340343: > > > > > > > > > #include > >

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

2018-11-28 Thread Peter Holm
On Wed, Nov 28, 2018 at 01:46:17AM +0200, Konstantin Belousov wrote: > On Wed, Nov 28, 2018 at 12:54:21AM +0300, Vladimir Kondratyev wrote: > > Following test case triggers assertion after r340343: > > > > > > #include > > > > int > > main(int argc, char **argv) > > { > >    

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

2018-11-27 Thread Konstantin Belousov
On Wed, Nov 28, 2018 at 12:54:21AM +0300, Vladimir Kondratyev wrote: > Following test case triggers assertion after r340343: > > > #include > > int > main(int argc, char **argv) > { >     openat(open("/etc", O_RDONLY), "termcap", O_RDONLY | O_BENEATH); > } > > It results in: > > panic:

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

2018-11-27 Thread Vladimir Kondratyev
Following test case triggers assertion after r340343: #include 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