Re: bug tracking question (VFS crash)

Manfred Spraul (masp0008@stud.uni-sb.de)
Sat, 24 Apr 1999 11:42:52 +0200


Alexander Viro wrote:
>
> On Fri, 23 Apr 1999, Manfred Spraul wrote:
>
> > i'm currently tracking a bug in VFS.
> > (Please HELP-thread).
> >
> > My first impression is that:
> > 1) sys_lseek() is called
> > 2) file->f_dentry == NULL, i.e. goto out_putf
> Stop here.
>
> > My question(s):
> > a) when is file->f_dentry==NULL?
>
> When we got a bug. It should never happen. Can you reproduce the
> situation?

No I can't.
But I think that fput() should handle that situation without
crashing.

I figured out some more details:
sys_lseek():
* calls fget()
* ...
* calls fput()
* fput() notices file->f_count==0!
otherwise it would not call locks_remove_flock().

This means there must be an bad entry in
files->fd[].
get_unused_fd() [in fs/open.c] contains a sanity check for
that case. Do you know why that check was added?

Regards,
Manfred

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