From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Andi Kleen <ak@suse.de>,
pavel@suse.cz, LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH -rt] race condition in fs/compat.c with compat_sys_ioctl
Date: Wed, 16 Nov 2005 11:03:23 +0100 [thread overview]
Message-ID: <20051116100323.GA26822@elte.hu> (raw)
In-Reply-To: <1132134370.5047.73.camel@localhost.localdomain>
* Steven Rostedt <rostedt@goodmis.org> wrote:
> It's still there in 2.6.15-rc1-git3 (the sem is the down_read of
> ioctl32_sem in fs/compat.c).
>
> No, the problem was unique to the rt patch. In -rt the default
> down_read is just like a down (since it is very hard to do PI on
> readers and writer locks). So the solution in -rt was to convert this
> back to a normal RW sem.
to be precise: rwsems in PREEMPT_RT are "only one reader, but reader
might self-recurse". I.e. the sequence of:
down_read();
...
down_read();
...
up_read();
...
up_read();
is still supported.
this very simple rw-semaphore type covers the overwhelming majority of
uses: out of hundreds of rwsems in the kernel, ioctl32_sem is the first
one that had to be converted to a 'compat' rwsem.
Ingo
next prev parent reply other threads:[~2005-11-16 10:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1131821278.5047.8.camel@localhost.localdomain>
[not found] ` <5bdc1c8b0511121725u6df7ad9csb9cb56777fa6fe64@mail.gmail.com>
[not found] ` <Pine.LNX.4.58.0511122149020.25152@localhost.localdomain>
[not found] ` <5bdc1c8b0511121914v12dc4402u424fbaf416bf3710@mail.gmail.com>
[not found] ` <1131853456.5047.14.camel@localhost.localdomain>
[not found] ` <5bdc1c8b0511130634h501fb565v58906bdfae788814@mail.gmail.com>
[not found] ` <1131994030.5047.17.camel@localhost.localdomain>
[not found] ` <5bdc1c8b0511141057l60a2e778x89155cd5484d532f@mail.gmail.com>
2005-11-16 4:29 ` Steven Rostedt
2005-11-16 5:55 ` Andi Kleen
2005-11-16 8:33 ` Ingo Molnar
2005-11-16 9:46 ` Steven Rostedt
2005-11-16 10:03 ` Ingo Molnar [this message]
2005-11-16 8:32 ` Ingo Molnar
2005-11-16 9:40 ` Steven Rostedt
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=20051116100323.GA26822@elte.hu \
--to=mingo@elte.hu \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
--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®