Martin Blapp <[EMAIL PROTECTED]> writes:
> kernel trap 12 with interrupts disabled
> 
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0x123423bd
> fault code              = supervisor read, page not present
> instruction pointer     = 0x8:0xc024d74a
> stack pointer           = 0x10:0xcdc4dc70
> frame pointer           = 0x10:0xcdc4dc7c
> code segment            = base 0x0, limit 0xfffff, type 0x1b
>                         = DPL 0, pres 1, def32 1, gran 1
> processor eflags        = resume, IOPL = 0
> current process         = 12 (swi6: tty:sio clock)
> kernel: type 12 trap, code=0
> Stopped at      _mtx_lock_sleep+0x14e:  movb    0x45(%eax),%al
> db> trace
> _mtx_lock_sleep(cf610f10,0,c03c7966,27b) at _mtx_lock_sleep+0x14e
> _mtx_lock_flags(cf610f10,0,c03c7966,27b,6) at _mtx_lock_flags+0x79
> realitexpire(cf610d04) at realitexpire+0x24

This is caused by incorrect usage of callout_reset() in linux_misc.c:
it passes a struct thread * argument instead of the struct proc *
realitexpire() expects.  Untested patch attached.

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

Index: linux_misc.c
===================================================================
RCS file: /home/ncvs/src/sys/compat/linux/linux_misc.c,v
retrieving revision 1.109
diff -u -r1.109 linux_misc.c
--- linux_misc.c	10 Oct 2001 23:06:51 -0000	1.109
+++ linux_misc.c	24 Nov 2001 12:02:26 -0000
@@ -189,7 +189,7 @@
 		callout_stop(&td->td_proc->p_itcallout);
 	if (it.it_value.tv_sec != 0) {
 		callout_reset(&td->td_proc->p_itcallout, tvtohz(&it.it_value),
-		    realitexpire, td);
+		    realitexpire, td->td_proc);
 		timevaladd(&it.it_value, &tv);
 	}
 	td->td_proc->p_realtimer = it;

Reply via email to