xiaowei.hu at oracle.com
2012-Dec-04 03:15 UTC
[Ocfs2-devel] [PATCH] mkfs.ocfs2 null pointer dereference.
Reproduce steps as below: 1.minimal install OL5.8 x86_64 2.install 2.6.39-300.17.1.el5uek.bug14842737 3.cofigure ocfs2 [root at ca-ostest284 ~]# cat /etc/ocfs2/cluster.conf cluster: node_count = 1 name = ocfs2 node: ip_port = 7777 ip_address = 139.185.50.68 number = 1 name = ca-ostest284.us.oracle.com cluster = ocfs2 4. run ocfs2 test suit single node test, and hit panic [root at ca-ostest284 ~]# nohup ./single_run-WIP.sh -k ~/linux-kernel.tar.gz -m /mnt/ocfs2 -l ~/ocfs2log -d /dev/sda3 &> sin_1119_1 & 5. reboot 6. run ocfs2 test suit disontig single node test, and hit panic again [root at ca-ostest284 ~]# nohup time ./discontig_runner.sh -d /dev/sda3 -o ~/ocfs2log/ /mnt/ocfs2 &> dis_sin_1121 &
xiaowei.hu at oracle.com
2012-Dec-04 03:15 UTC
[Ocfs2-devel] [PATCH] mkfs.ocfs2 null pointer dereference. Pid: 4508, comm: mkfs.ocfs2 Not tainted 2.6.39-300.17.1.el5uek.bug14842737 #1 Dell Inc. PowerEdge 1950/0M788G RIP: 0010:[<ffffffff81098bff>] [<ffffffff81098bff>] exit_creds+0x1f/0xb0 RSP: 0018:ffff880222b4dd58 EFLAGS: 00010292 RAX: 0000000000000000 RBX: ffff88021f394480 RCX: ffff88021f1f2d90 RDX: 0000000000000013 RSI: ffff88021e9c4a00 RDI: 0000000000000000 RBP: ffff880222b4dd68 R08: 0000000000000003 R09: 0000000000000020 R10: ffff880222b4dd18 R11: 0000000000000001 R12: ffff88021f394480 R13: ffffffffa065ca88 R14: ffff88021e9c4a00 R15: ffff88021e9c4a00 FS: 00007fa5e950c730(0000) GS:ffff88022fcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000021e166000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process mkfs.ocfs2 (pid: 4508, threadinfo ffff8802! 22b4c000, task ffff88022024c4c0) Stack: ffff880222b4dd88 ffff88021f394480 ffff880222b4dd88 ffffffff8106e802 ffff88021f394480 0000000000000000 ffff880222b4dda8 ffffffff81090c38 ffff88021f394480 ffff88021e9c4a00 ffff880222b4dde8 ffffffffa064b78d Call Trace: [<ffffffff8106e802>] __put_task_struct+0x42/0x100 [<ffffffff81090c38>] kthread_stop+0x78/0xd0 [<ffffffffa064b78d>] o2hb_heartbeat_group_drop_item+0x6d/0x1d0 [ocfs2_nodemanager] [<ffffffffa0635136>] client_drop_item+0x26/0x40 [configfs] [<ffffffffa063650e>] configfs_rmdir+0x20e/0x2c0 [configfs] [<ffffffff81186c08>] ? shrink_dcache_parent+0x38/0x50 [<ffffffff8117b55b>] vfs_rmdir+0xdb/0x130 [<ffffffff8117eb0b>] do_rmdir+0x10b/0x120 [<ffffffff810cf78b>] ? audit_syscall_entry+0x17b/0x1e0 [<ffffffff8117eb76>] sys_rmdir+0x16/0x20 [<ffffffff81510642>] system_call_fastpath+0x16/0x1b Code: 80 00 00 00 00 0f 1f 80 00 00 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 8b 87 30 06 00 00 48 89 fb 48 8b bf 28 06 00 00 <8! b> 00 48 c7 83 28 06 00 00 00 00 00 00 f0 ff 0f 0f 94 c0 84 c0 RIP [<
From: "Xiaowei.Hu" <xiaowei.hu at oracle.com> --- fs/ocfs2/cluster/heartbeat.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 61561c6..94193ac 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -2143,8 +2143,10 @@ static void o2hb_heartbeat_group_drop_item(struct config_group *group, reg->hr_item_dropped = 1; spin_unlock(&o2hb_live_lock); - if (hb_task) + if (hb_task) { kthread_stop(hb_task); + hb_task = NULL; + } if (o2hb_global_heartbeat_active()) { spin_lock(&o2hb_live_lock); -- 1.7.7.6