PERFORCE change 122479 for review
Roman Divacky
rdivacky at FreeBSD.org
Thu Jun 28 12:05:32 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=122479
Change 122479 by rdivacky at 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);
}
More information about the p4-projects
mailing list