I am writing a KLD that gives me kernel fault each time I run 'ps' command
after 'make unload'. The KLD has a system call to create several kernel
threads by calling kthread_create(). During unload, I set flags to each
threads so that they will call exit1() upon wakeup (sleep on a timeout).
Before the last thread calls exit1(), it wakeup the kld unload process so
that make 'unload' can finish. Is there anything wrong or better
solutions?
I also use vm_zone to allocate some data structes within the KLD. When
unloading, I can use zfree() to free them except the zone header that I
can not free(some_zone, M_ZONE). This is because M_ZONE is defined as
*static* in vm_zone.c I wonder if this will cause memory leak after
several loading and unloading the KLD.
Finally, I want to know how to save the panic screen without hand writing
it down. Any info on debugging under db> after fault?
Any help is appreciated.
-Zhihui
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message