Hello,
I found since 2.6.25 kernels, uml crashes when it calls down() on a
semaphore with
zero counter. Here is some example code.
static struct semaphore test_sem;
static int testfunc(NULL)
{
interruptible_sleep_on_timeout(&sleep_queue, 5 * HZ); // after some
short period
up(&test_sem); // up the semaphore
}
static int parent_func(unsigned argc, char **argv)
{
sema_init(&test_sem, 0); // init semaphore with zero counter
kernel_thread((void *)testfunc, target, CLONE_FILES); // create a
thread that will up the semaphore
down_interruptible(&test_sem); // SHOULD wait here until testfunc up
the semaphore
}
Our kernel module has used this kind of code to synchronize different kernel
threads.
It runs fine on real machine and old uml kernels, but crashes on
2.6.25.4uml. I tried the
latest 2.6.25.9 kernel, and still saw the same problem. It seems to have
something to
do with uml's signal handling. Does anyone know what changes in 2.6.25 uml
code that
may cause the problem? Thanks a lot!
Jiaying
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel