virtiofsd: fail when parent inode isn't known in lo_do_lookup()
commit9de4fab5995d115f8ebfb41d8d94a866d80a1708
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 20 Nov 2019 14:14:29 +0000 (20 14:14 +0000)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:37 +0000 (23 16:41 +0000)
treeaea2750973a7cc4541258b666e7bc70d048872a4
parent95d2715791c60b5dc2d22e4eb7b83217273296fa
virtiofsd: fail when parent inode isn't known in lo_do_lookup()

The Linux file handle APIs (struct export_operations) can access inodes
that are not attached to parents because path name traversal is not
performed.  Refuse if there is no parent in lo_do_lookup().

Also clean up lo_do_lookup() while we're here.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c