Early call_usermodehelper causes double fault on x86_64

From: Chris Wright
Date: Wed Oct 27 2004 - 14:54:10 EST


Hi,

I'm seeing a double fault on recent (2.6.10-rc1-bk) kernels during
driver_init(). The upcall to userspace gets far enough to schedule the
work, khelper picks it up, calls kernel_thread, the child thread does
execve, then double faults. Bootup continues, I get three more double
faults, then the system appears fine (even w/ continued upcalls).

I have an example of the fault below. It shows a rip and rsp
of 0. I poked about a bit and see that the FAKE_STACK_FRAME $0 in
arch/x86-64/kernel/entry.S sets up a 0 rip, and if I change the \rip
in that macro call, that's the rip in the double fault. Any ideas on
further debugging?

thanks,
-chris

double fault: 0000 [1] PREEMPT SMP
CPU 1
Modules linked in:
Pid: 9, comm: khelper Tainted: G M 2.6.10-rc1
RIP: 0010:[<0000000000000000>] [<0000000000000000>]
RSP: 0000:0000000000000000 EFLAGS: 00010202
RAX: 0000000000000000 RBX: 000001007ff09dc8 RCX: 000001007ff0e870
RDX: 000001003fff9e88 RSI: 000001007ff09e58 RDI: ffffffff805b8fe0
RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000000 R12: 0000010037e87120
R13: 0000000000000206 R14: 000001007ff09dc8 R15: ffffffff80149200
FS: 0000000000000000(0000) GS:ffffffff816daa40(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007ff0a000 CR4: 00000000000006e0
Process khelper (pid: 9, threadinfo 000001000258c000, task 000001007ff0e870)
Stack: 0000010037ea8e58 0000000000000000 0000010037ea8f58 0000000000000000
0000000000000001 ffffffff80111f78 0000000000000004 0000010037ea8f58
0000000000000000 0000000000000000
Call Trace:<ffffffff80111f78>{show_registers+200} <ffffffff8011222b>{__die+155}
<ffffffff801122a6>{die+54} <ffffffff80112bbf>{do_double_fault+175}
<ffffffff801118ed>{double_fault+125} <ffffffff80149200>{__call_usermodehelper+0}


Code: Bad RIP value.
RIP [<0000000000000000>] RSP <0000000000000000>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/