[PATCH] HVC init race
Michael Neuling
mikey at neuling.org
Fri Nov 4 18:02:31 EST 2005
> What is the race exactly? I guess nothing should be calling into
> hvc_open before tty_register_driver()...?
init_dev (from tty_io.c) seems to be racing with hvc_init (from
hvc_console.c). Hence we can hit this section at the start if init_dev:
if (driver->flags & TTY_DRIVER_DEVPTS_MEM) {
tty = devpts_get_tty(idx);
if (tty && driver->subtype == PTY_TYPE_MASTER)
tty = tty->link;
} else {
tty = driver->ttys[idx]; /* Crashing here */
}
and driver->flags is good but driver->ttys[idx] is not inited yet.
----
cpu 0x5: Vector: 300 (Data Access) at [c000000039f23690]
pc: c0000000002a1dc8: .init_dev+0x158/0x760
lr: c0000000002a1db8: .init_dev+0x148/0x760
sp: c000000039f23910
msr: 9000000000009032
dar: 0
dsisr: 40000000
current = 0xc00000003a4147e0
paca = 0xc0000000005d7800
pid = 17150, comm = modprobe
enter ? for help
5:mon> t
[c000000039f239f0] c0000000002a2564 .tty_open+0x194/0x480
[c000000039f23ab0] c0000000000ce994 .chrdev_open+0x154/0x2a0
[c000000039f23b60] c0000000000bf280 .__dentry_open+0x140/0x3d0
[c000000039f23c10] c0000000000bf664 .filp_open+0x64/0x80
[c000000039f23d00] c0000000000bf868 .do_sys_open+0x68/0x120
[c000000039f23db0] c0000000000fd3e0 .compat_sys_open+0x10/0x30
[c000000039f23e30] c000000000008900 syscall_exit+0x0/0x18
--- Exception: c01 (System Call) at 000000000ff69810
SP (ff918950) is in userspace
5:mon>
Mikey
More information about the Linuxppc64-dev
mailing list