From: "Jiaying Zhang" <jiayingz@google.com>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [SPAM] [uml-devel] 2.6.25 uml kernel crashes when it calls down() on a semaphore with zero counter
Date: Thu, 3 Jul 2008 00:53:46 -0700 [thread overview]
Message-ID: <5df78e1d0807030053x8a9bfabo582ea78e74b2c65b@mail.gmail.com> (raw)
[-- 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
next reply other threads:[~2008-07-03 7:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 7:53 Jiaying Zhang [this message]
2008-07-03 13:56 ` [SPAM] Re: [uml-devel] 2.6.25 uml kernel crashes when it calls down() on a semaphore with zero counter 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5df78e1d0807030053x8a9bfabo582ea78e74b2c65b@mail.gmail.com \
--to=jiayingz@google.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox