Kernel crash w/o reason

2004-12-23 Thread Jan Engelhardt
Hello list, for some reason, the Freebsd (5.3) kernel crashes whenever I do simple operations, in conjunction with a (self-written) kernel module. I have trimmed the original program down from approx 120 KB to the 7 KB (lots of spacing and tabs :) to follow the common advise to find the

Re: Kernel crash w/o reason

2004-12-23 Thread Max Laier
On Thursday 23 December 2004 22:44, Jan Engelhardt wrote: for some reason, the Freebsd (5.3) kernel crashes whenever I do simple operations, in conjunction with a (self-written) kernel module. I have trimmed the original program down from approx 120 KB to the 7 KB (lots of spacing and tabs :)

Re: Kernel crash w/o reason

2004-12-23 Thread Daniel Eischen
On Thu, 23 Dec 2004, Jan Engelhardt wrote: Hello list, for some reason, the Freebsd (5.3) kernel crashes whenever I do simple operations, in conjunction with a (self-written) kernel module. I have trimmed the original program down from approx 120 KB to the 7 KB (lots of spacing and tabs

Re: Kernel crash w/o reason

2004-12-23 Thread Jan Engelhardt
1) In kmi_fops.d_open(): |if(!mtx_trylock(Open_lock)) { return EBUSY; } |return 0; this can not work. You cannot return to userland with a lock acquired. So? The full code also contains a uio_read() function. If I release the lock in uio_read(), no crash happens. It's just in

Re: Kernel crash w/o reason

2004-12-23 Thread David Schultz
On Fri, Dec 24, 2004, Jan Engelhardt wrote: 1) In kmi_fops.d_open(): |if(!mtx_trylock(Open_lock)) { return EBUSY; } |return 0; this can not work. You cannot return to userland with a lock acquired. So? The full code also contains a uio_read() function. If I release the lock in