Page MenuHomeFreeBSD

linkat(2): check NIRES_EMPTYPATH on the first fd arg
ClosedPublic

Authored by kib on Apr 19 2021, 1:38 PM.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib requested review of this revision.Apr 19 2021, 1:38 PM
kib created this revision.
sys/kern/vfs_syscalls.c
1580

How can it be null? kern_linkat_vp() dereferences nd.ni_vp unconditionally.

This revision is now accepted and ready to land.Apr 19 2021, 1:51 PM
kib marked an inline comment as done.Apr 19 2021, 3:02 PM
kib added inline comments.
sys/kern/vfs_syscalls.c
1580

Yes, LOOKUP only returns success when there is something to lookup.

kib marked an inline comment as done.

Remove ni_vp != NULL check.

This revision now requires review to proceed.Apr 19 2021, 3:03 PM
This revision is now accepted and ready to land.Apr 19 2021, 3:04 PM