deja-vu Error deref NULL pointer by umount ramfs in 2.4.0-test2

From: wollny (wollny@cns.mpg.de)
Date: Sat Jun 24 2000 - 09:29:25 EST


Hello Alexander,

with Version 2.4.0-test2 the error I posted at 15.6 (see below) happens
again.

Your patch solved this (and other ramfs problems) against -ac19, but the
changes are not in test2 and the patch is rejected in most parts. Any
other idea?

Thanks in advance.

Gert

Please CC me when posting to linux-kernel.

---------- Forwarded message ----------
Date: Thu, 15 Jun 2000 22:41:06 +0200 (CEST)
From: wollny <wollny@bolide.beigert.de>
To: linux-kernel@vger.rutgers.edu
Subject: The next ramfs bug ...

Hi,

when unmounting ramfs i always get a "unable to dereference NULL pointer
message"

With a look at the code, i found the following:

During the unmounting kill_super in ./fs/super.c is called:

static struct block_device *kill_super(struct super_block *sb, int umount_root)
{
        struct block_device *bdev;
        kdev_t dev;
        dput(sb->s_root);
        sb->s_root = NULL; <=== Note this
        lock_super(sb);
        if (sb->s_op) {
                if (sb->s_op->write_super && sb->s_dirt)
                        sb->s_op->write_super(sb);
                if (sb->s_op->put_super)
                        sb->s_op->put_super(sb); <==== call the ramfs_put_super
[snip]

./fs/ramfs/inode.c
static void ramfs_put_super(struct super_block *sb)
{
        d_genocide(sb->s_root); <=== sb->s_root == NULL
        shrink_dcache_parent(sb->s_root);
}

./fs/dcache.c
void d_genocide(struct dentry *root)
{
        struct dentry *this_parent = root;
        struct list_head *next;

repeat:
        next = this_parent->d_subdirs.next; <=== this_parent == NULL (ever!)
resume:
 [...]
 

-
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/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:04 EST