Re: 2.1.110 oops

Linus Torvalds (torvalds@transmeta.com)
Mon, 27 Jul 1998 15:00:33 -0700 (PDT)


On Mon, 27 Jul 1998, Stephen C. Tweedie wrote:
>
> This is related to the quota oops you just posted a patch for. We are
> calling close_fp on a filp which does not yet have a dentry. The
> close_fp does not check for null dentry, and dereferences d_inode
> regardless. Patch to "fix":
>
> ----------------------------------------------------------------
> --- fs/open.c~ Sat May 9 06:55:06 1998
> +++ fs/open.c Mon Jul 27 22:09:15 1998
> @@ -796,7 +796,7 @@
> printk("VFS: Close: file count is 0\n");
> return 0;
> }
> - if (dentry->d_inode)
> + if (dentry && dentry->d_inode)
> locks_remove_posix(filp, id);
> return fput(filp);
> }

I don't think this is a proper fix. You should never have been able to
open a file without a dentry.

I missed the beginning of this, how was the oops generated?

Linus

-
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.altern.org/andrebalsa/doc/lkml-faq.html