tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

UFS extended attributes broken


On -current and netbsd-6, starting extended attributes is broken. I just
fixed a NULL pointer reference that caused a panic, but there is another

ufs_extattr_autostart() needs to lookup .attribute/user and
.attribute/system directories on the top of the filesystem. It is done
through ufs_extattr_lookup(),which does this:

        memset(&cnp, 0, sizeof(cnp));
        cnp.cn_nameiop = LOOKUP;
        cnp.cn_flags = ISLASTCN | lockparent;
        cnp.cn_cred = l->l_cred;
        cnp.cn_nameptr = pnbuf;
        error = copystr(dirname, pnbuf, MAXPATHLEN, &cnp.cn_namelen);
        if (error) {
        /* removed error handling for clarty sake */
        cnp.cn_namelen--;       /* trim nul termination */
        vargs.a_desc = NULL;
        vargs.a_dvp = start_dvp;
        vargs.a_vpp = &target_vp;
        vargs.a_cnp = &cnp;
        error = ufs_lookup(&vargs);
ufs_lookup now returns ENOENT while the directory exists. It did not do
that on netbsd-5. Any idea of what when wrong?

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index