Re: fd_install question ??

From: Mikael Pettersson (mikpe@user.it.uu.se)
Date: Thu Mar 06 2003 - 18:06:44 EST


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/



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:34 EST