9ns: ensure the parent of a rename target is a directory
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 30 Apr 2019 00:21:08 +0000 (20:21 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 30 Apr 2019 00:21:08 +0000 (20:21 -0400)
commitd48eeaff50a4560b780a0f547c5648af8bd5a145
treee204855f8f730c3f66ecba3668b19804e114f398
parent2a2a3b425db1c637e4708f1c22bac93e9d6df7ca
9ns: ensure the parent of a rename target is a directory

We subtracted the last element from the walk, but never checked that the
result of the walk was a directory.

Reported-by: syzbot+7e385d5c8a674a08d28a@syzkaller.appspotmail.com
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/chan.c