All of lore.kernel.org
 help / color / mirror / Atom feed
* [SPAM] [uml-devel] 2.6.25 uml kernel crashes when it calls down() on a semaphore with zero counter
@ 2008-07-03  7:53 Jiaying Zhang
  2008-07-03 13:56 ` [SPAM] " Jeff Dike
  0 siblings, 1 reply; 15+ messages in thread
From: Jiaying Zhang @ 2008-07-03  7:53 UTC (permalink / raw)
  To: user-mode-linux-devel


[-- Attachment #1.1: Type: text/plain, Size: 1047 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1559 bytes --]

[-- Attachment #2: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 194 bytes --]

_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-08-04 16:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03  7:53 [SPAM] [uml-devel] 2.6.25 uml kernel crashes when it calls down() on a semaphore with zero counter Jiaying Zhang
2008-07-03 13:56 ` [SPAM] " Jeff Dike
2008-07-04  1:06   ` Jiaying Zhang
2008-07-10  2:25     ` Jiaying Zhang
2008-07-10 17:02       ` Jeff Dike
2008-07-14  9:06         ` Jiaying Zhang
2008-07-14 14:46           ` Jeff Dike
2008-07-16  9:52             ` Jiaying Zhang
2008-07-17  4:55               ` Jiaying Zhang
2008-07-18 20:53                 ` Jeff Dike
2008-07-20 15:20                   ` Mattia Dongili
2008-07-20 15:44                     ` Jeff Dike
2008-07-21 12:54                       ` Mattia Dongili
2008-08-02  5:54                         ` Mattia Dongili
2008-08-04 16:44                           ` Jeff Dike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.