Re: fd_install question ??

Mikael Pettersson (mikpe@user.it.uu.se)
Fri, 7 Mar 2003 00:06:44 +0100


sudharsan vijayaraghavan writes:
> // f1->f_vfsmnt = f2->f_vfsmnt =
> mntget(mntget(pipe_mnt));
> --> f1->f_vfsmnt = f2->f_vfsmnt = f3->f_vfsmnt =
> mntget(mntget(pipe_mnt));
> // f1->f_dentry = f2->f_dentry = dget(dentry);
> --> f1->f_dentry = f2->f_dentry = f3->f_dentry =
> dget(dentry);

A unified diff would have been much more readable.

You now have one more reference to ->f_vfsmnt and ->f_dentry, so I
suspect you're missing one mntget() and one dget() above. The usual
impact of a too low ref count is that the object is reassigned while
you're still using it, with memory corruption & oopses as the result.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/