diff options
author | John Stultz <johnstul@us.ibm.com> | 2010-03-11 16:18:14 -0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-04-27 17:33:03 +0200 |
commit | 43415693162239081d6a2d727b3c84f4bb581509 (patch) | |
tree | 9eb42e936558c6a4b4fd5c429adc8a0e01ec1de3 | |
parent | 088758186424e52096d15ea7c52e74596691dd9f (diff) | |
download | lwn-43415693162239081d6a2d727b3c84f4bb581509.tar.gz lwn-43415693162239081d6a2d727b3c84f4bb581509.zip |
Revert Nick's fs-scale-pseudo
After adding an xfs partition to my system, I started seeing
boot time NULL pointer oopses, and bisected it down to the
fs-scale-pseudo change.
Not sure what the right fix is, but this change avoids the issue.
Here's the bug i was seeing on boot:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
IP: [<ffffffff81103d42>] link_path_walk+0xd12/0xda0
PGD 42b12e067 PUD 42cb2a067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/block/md0/dev
CPU 7
Pid: 2993, comm: vgs Not tainted 2.6.33-rc8john #272 Server Blade/IBM eServer BladeCenter HS21 -[7995AC1]-
RIP: 0010:[<ffffffff81103d42>] [<ffffffff81103d42>] link_path_walk+0xd12/0xda0
RSP: 0018:ffff88042a929b78 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88042ab41000 RCX: ffff88042ab41028
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88042aa0fcc0
RBP: ffff88042a929c28 R08: ffff88042aa0fcc0 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88042c6a40b0
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88042a929dc8
FS: 00007f6f8c481710(0000) GS:ffff8800283c0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000030 CR3: 000000042b310000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process vgs (pid: 2993, threadinfo ffff88042a928000, task ffff88042ab41000)
Stack:
ffff88042ab41000 ffff88042ab41000 ffff88042ab41000 ffff88042ab41000
<0> 0000000100000000 ffff88042a929de8 ffff880400000000 0000000000000000
<0> ffff88042f6b5610 0000000000000000 0000000000000000 ffff88042f418920
Call Trace:
[<ffffffff811006c2>] ? path_get+0x32/0x50
[<ffffffff81103c50>] link_path_walk+0xc20/0xda0
[<ffffffff811006c2>] ? path_get+0x32/0x50
[<ffffffff81103f7c>] path_walk+0x5c/0xd0
[<ffffffff811041de>] do_path_lookup+0x1ee/0x250
[<ffffffff81103ff0>] ? do_path_lookup+0x0/0x250
[<ffffffff81104ebb>] user_path_at+0x7b/0xb0
[<ffffffff81112bb1>] ? vfsmount_read_unlock+0x31/0x60
[<ffffffff81114788>] ? mntput_no_expire+0x48/0x190
[<ffffffff810fb293>] ? cp_new_stat+0xe3/0xf0
[<ffffffff810fb4ac>] vfs_fstatat+0x3c/0x80
[<ffffffff810fb616>] vfs_stat+0x16/0x20
[<ffffffff810fb63f>] sys_newstat+0x1f/0x50
[<ffffffff81994a33>] ? lockdep_sys_exit_thunk+0x35/0x67
[<ffffffff810025eb>] system_call_fastpath+0x16/0x1b
Code: ec e8 93 c8 ff ff 0f 1f 00 e9 46 ff ff ff 41 83 7f 34 04 66 0f 1f 44 00 00 0f 85 38 ff ff ff 4d 8b 67 08 49 8b 84 24 b8 00 00 00 <48> 8b 40 30 f6 40 09 40 0f 84 1e ff ff ff 49 8b 44 24 70 4c 89
RIP [<ffffffff81103d42>] link_path_walk+0xd12/0xda0
RSP <ffff88042a929b78>
CR2: 0000000000000030
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---[ end trace 0dd94d94b1b27094 ]---
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | fs/anon_inodes.c | 4 | ||||
-rw-r--r-- | fs/pipe.c | 4 | ||||
-rw-r--r-- | net/socket.c | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index c714d50eea79..81f82e7e7290 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -105,11 +105,9 @@ struct file *anon_inode_getfile(const char *name, this.name = name; this.len = strlen(name); this.hash = 0; - path.dentry = d_alloc(NULL, &this); + path.dentry = d_alloc(anon_inode_mnt->mnt_sb->s_root, &this); if (!path.dentry) goto err_module; - path.dentry->d_parent = path.dentry; - path.dentry->d_flags |= DCACHE_DISCONNECTED; path.mnt = mntget(anon_inode_mnt); /* diff --git a/fs/pipe.c b/fs/pipe.c index 4ef0fb045b6f..a9dcf21a8871 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -983,12 +983,10 @@ struct file *create_write_pipe(int flags) goto err; err = -ENOMEM; - path.dentry = d_alloc(NULL, &name); + path.dentry = d_alloc(pipe_mnt->mnt_sb->s_root, &name); if (!path.dentry) goto err_inode; path.mnt = mntget(pipe_mnt); - path.dentry->d_parent = path.dentry; - path.dentry->d_flags |= DCACHE_DISCONNECTED; path.dentry->d_op = &pipefs_dentry_operations; d_instantiate(path.dentry, inode); diff --git a/net/socket.c b/net/socket.c index ac4463b2bd40..371eaf092a31 100644 --- a/net/socket.c +++ b/net/socket.c @@ -360,14 +360,12 @@ static int sock_alloc_file(struct socket *sock, struct file **f, int flags) if (unlikely(fd < 0)) return fd; - path.dentry = d_alloc(NULL, &name); + path.dentry = d_alloc(sock_mnt->mnt_sb->s_root, &name); if (unlikely(!path.dentry)) { put_unused_fd(fd); return -ENOMEM; } path.mnt = mntget(sock_mnt); - path.dentry->d_parent = path.dentry; - path.dentry->d_flags |= DCACHE_DISCONNECTED; path.dentry->d_op = &sockfs_dentry_operations; d_instantiate(path.dentry, SOCK_INODE(sock)); |