Date: Thu, 28 Jun 2007 12:05:30 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 122479 for review Message-ID: <200706281205.l5SC5Ukp045556@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=122479 Change 122479 by rdivacky@rdivacky_witten on 2007/06/28 12:04:32 Initialize dvp's to NULL to prevent panic... also vrele before unlocking Giant. Affected files ... .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_syscalls.c#40 edit Differences ... ==== //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_syscalls.c#40 (text+ko) ==== @@ -1585,7 +1585,7 @@ enum uio_seg segflg, int follow) { struct nameidata ndp, ndl; - struct vnode *pdvp, *ldvp; + struct vnode *pdvp = NULL, *ldvp = NULL; struct vnode *vp; struct mount *mp; int vfslocked; @@ -1602,10 +1602,10 @@ error = kern_get_at(td, fd2, &ldvp); if (error && !kern_absolute_path(path2, segflg)) { if (pdvp) { + vrele(pdvp); if (VFS_NEEDSGIANT(pdvp->v_mount)) mtx_unlock(&Giant); } - vrele(pdvp); return (error); } @@ -3821,7 +3821,7 @@ const char *new, enum uio_seg pathseg) { struct nameidata fromnd, tond; - struct vnode *frdvp, *todvp; + struct vnode *frdvp = NULL, *todvp = NULL; struct mount *mp = NULL; struct vnode *tvp, *fvp, *tdvp; int tvfslocked; @@ -3835,10 +3835,10 @@ error = kern_get_at(td, newfd, &todvp); if (error && !kern_absolute_path(new, pathseg)) { if (frdvp) { + vrele(frdvp); if (VFS_NEEDSGIANT(frdvp->v_mount)) mtx_unlock(&Giant); } - vrele(frdvp); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706281205.l5SC5Ukp045556>