public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Katsuya Matsubara <matsu@igel.co.jp>
To: linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Steven Rostedt <srostedt@redhat.com>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	Paul Mundt <lethal@linux-sh.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Katsuya Matsubara <matsu@igel.co.jp>
Subject: [PATCH RT 3/4] sh: decouple the pagefault-disabled logic
Date: Thu, 12 Feb 2009 00:01:42 +0900	[thread overview]
Message-ID: <1234364503-857-4-git-send-email-matsu@igel.co.jp> (raw)
In-Reply-To: <1234364503-857-3-git-send-email-matsu@igel.co.jp>

The preempt-rt patch adds a pagefault-disabled logic. We must not take
page faults if pagefault_disabled > 0. The same treatment can be found
in other arch code.

Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
---
 arch/sh/mm/fault_32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 898d477..2746b08 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -100,7 +100,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
 	 * If we're in an interrupt or have no user
 	 * context, we must not take the fault..
 	 */
-	if (in_atomic() || !mm)
+	if (in_atomic() || !mm || current->pagefault_disabled)
 		goto no_context;
 
 	down_read(&mm->mmap_sem);
-- 
1.6.1


  reply	other threads:[~2009-02-11 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 15:01 [PATCH RT 0/4] sh arch support for 2.6.28-rt Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 1/4] sh: use __preempt_enable_no_resched in cpu_idle() Katsuya Matsubara
2009-02-11 15:01   ` [PATCH RT 2/4] sh: enable interrupts in signal handling Katsuya Matsubara
2009-02-11 15:01     ` Katsuya Matsubara [this message]
2009-02-11 15:01       ` [PATCH RT 4/4] convert-locks-list: add sh specific spin locks Katsuya Matsubara
2009-02-11 15:16 ` [PATCH RT 0/4] sh arch support for 2.6.28-rt 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=1234364503-857-4-git-send-email-matsu@igel.co.jp \
    --to=matsu@igel.co.jp \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=srostedt@redhat.com \
    --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