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 :) to follow the common advise to find the
> shortest codepiece showing the problem.
> Well, you can retrieve the short prog at
> http://linux01.org/~jengelh/BUG.tbz2 Both files (rpldev.c and rpld.c) seem
> perfectly fine, but ...
> see rpld.c for the details of the crash.
>
> Hope someone can shed some light on this.

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.

2) If you report a problem, try to provide an error message. In this case a 
crashdump/panic string. When you do kernel programming you should always run 
in a debug kernel. To debug this specific problem WITNESS is helpful.

3) The details about your specific problem here are insufficient.

4) Why on earth do you use gmake? What's wrong with bsd.*.mk? It's a whole lot 
easier.

-- 
/"\  Best regards,                      | [EMAIL PROTECTED]
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | [EMAIL PROTECTED]
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

Attachment: pgpJ9iqUCF25g.pgp
Description: PGP signature

Reply via email to