Re: [Qemu-devel] [PATCH v4 3/3] 9pfs: handle walk of ".." in the root directory

2016-09-15 Thread Paolo Bonzini
On 30/08/2016 20:40, Greg Kurz wrote: > + > +err = fid_to_qid(pdu, fidp, &qid); > +if (err < 0) { > +goto out; > +} > + > v9fs_path_init(&dpath); > v9fs_path_init(&path); The "out" label can now be reached without having initialized dpath and path. This upsets Cove

[Qemu-devel] [PATCH v4 3/3] 9pfs: handle walk of ".." in the root directory

2016-08-30 Thread Greg Kurz
The 9P spec at http://man.cat-v.org/plan_9/5/intro says: All directories must support walks to the directory .. (dot-dot) meaning parent directory, although by convention directories contain no explicit entry for .. or . (dot). The parent of the root directory of a server's tree is itself. This