From: Daniel Walker <dwalker@mvista.com>
To: Remy Bohmer <linux@bohmer.net>
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
RT <linux-rt-users@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [BUG on PREEMPT_RT, 2.6.23.1-rt5] in rt-mutex code and signals
Date: Sat, 17 Nov 2007 08:22:30 -0800 [thread overview]
Message-ID: <1195316550.25393.21.camel@imap.mvista.com> (raw)
In-Reply-To: <3efb10970711170344n670d8b69w6679d494922c5bb@mail.gmail.com>
On Sat, 2007-11-17 at 12:44 +0100, Remy Bohmer wrote:
> Hello Steven,
>
> > The taker of a mutex must also be the one that releases it. I don't see
> > how you could use a mutex for this. It really requires some kind of
> > completion, or a compat_semaphore.
>
> I tried several ways of working around the bug, even tried
> implementing it with kernel threads and protecting global data with
> mutexes. Therefor I know that I have the same problem with mutexes. I
> just created a simple example that showed the problem quickly, this
> does not mean that this is the only case that does not work.
I tried your example and I was able to reproduce the OOPS that you
found.. Although there is one problem, you don't have the same number of
up()'s to down() calls so you end up leaving the dummy_read function
with the lock still held ..
Reviewing the OOPS and the warnings it looks like your progressively
corrupting the mutex waiter list since remove_waiter() actually leaves
the stack based waiter object on the waiter list.. (That's what it looks
like anyway)..
So I converted your code to use a compat_semaphore, and no oops
happens.. Which makes sense because compat_semaphores are designed to
work the way your using them.
Daniel
next prev parent reply other threads:[~2007-11-17 16:26 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-16 15:51 Remy Bohmer
2007-11-16 20:20 ` Steven Rostedt
2007-11-16 23:02 ` Remy Bohmer
2007-11-16 23:37 ` Steven Rostedt
2007-11-17 11:44 ` Remy Bohmer
2007-11-17 14:08 ` Steven Rostedt
2007-11-17 15:06 ` Steven Rostedt
2007-11-17 15:36 ` Remy Bohmer
2007-11-19 12:55 ` Remy Bohmer
2007-11-19 13:54 ` Steven Rostedt
2007-11-17 16:22 ` Daniel Walker [this message]
2007-11-17 17:09 ` Remy Bohmer
2007-11-17 17:29 ` Daniel Walker
2007-11-17 17:46 ` Ingo Molnar
2007-11-17 17:55 ` Daniel Walker
2007-11-17 18:04 ` Ingo Molnar
2007-11-17 18:12 ` Daniel Walker
2007-11-18 12:33 ` Peter Zijlstra
2007-11-18 22:26 ` David Chinner
2007-11-17 22:49 ` Remy Bohmer
2007-11-19 7:25 ` Jon Masters
2007-11-19 15:31 ` Daniel Walker
2007-11-19 15:51 ` Remy Bohmer
2007-11-19 16:11 ` Daniel Walker
2007-11-20 16:43 ` Daniel Walker
2007-11-20 20:37 ` Ingo Molnar
2007-11-20 20:54 ` Daniel Walker
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=1195316550.25393.21.camel@imap.mvista.com \
--to=dwalker@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux@bohmer.net \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®