linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Li Zhong <zhong@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Li Zhong <zhong@linux.vnet.ibm.com>,
	fweisbec@gmail.com, paulus@samba.org, paulmck@linux.vnet.ibm.com,
	linuxppc-dev@lists.ozlabs.org
Subject: [RFC PATCH 3/5] powerpc: Exit user context on notify resume
Date: Fri,  1 Feb 2013 18:27:43 +0800	[thread overview]
Message-ID: <1359714465-6297-4-git-send-email-zhong@linux.vnet.ibm.com> (raw)
In-Reply-To: <1359714465-6297-1-git-send-email-zhong@linux.vnet.ibm.com>

This patch allows RCU usage in do_notify_resume, e.g. signal handling.
It corresponds to
[PATCH] x86: Exit RCU extended QS on notify resume
  commit edf55fda35c7dc7f2d9241c3abaddaf759b457c6

Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/signal.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c
index 3b99711..c1eaea2 100644
--- a/arch/powerpc/kernel/signal.c
+++ b/arch/powerpc/kernel/signal.c
@@ -13,6 +13,7 @@
 #include <linux/signal.h>
 #include <linux/uprobes.h>
 #include <linux/key.h>
+#include <linux/context_tracking.h>
 #include <asm/hw_breakpoint.h>
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
@@ -158,6 +159,8 @@ static int do_signal(struct pt_regs *regs)
 
 void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
 {
+	user_exit();
+
 	if (thread_info_flags & _TIF_UPROBE)
 		uprobe_notify_resume(regs);
 
@@ -168,6 +171,8 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
 		clear_thread_flag(TIF_NOTIFY_RESUME);
 		tracehook_notify_resume(regs);
 	}
+
+	user_enter();
 }
 
 long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
-- 
1.7.9.5

  parent reply	other threads:[~2013-02-01 10:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 10:27 [RFC PATCH 0/5] powerpc: Support context tracking for Power pSeries Li Zhong
2013-02-01 10:27 ` [RFC PATCH 1/5] powerpc: Syscall hooks for context tracking subsystem Li Zhong
2013-02-07  0:29   ` Frederic Weisbecker
2013-02-07  8:53     ` Li Zhong
2013-02-07 16:09       ` Frederic Weisbecker
2013-02-10 10:32   ` Frederic Weisbecker
2013-02-01 10:27 ` [RFC PATCH 2/5] powerpc: Exception " Li Zhong
2013-02-10 14:10   ` Frederic Weisbecker
2013-02-16  9:41     ` Li Zhong
2013-02-01 10:27 ` Li Zhong [this message]
2013-02-01 10:27 ` [RFC PATCH 4/5] powerpc: Use the new schedule_user API on userspace preemption Li Zhong
2013-02-01 10:27 ` [RFC PATCH 5/5] powerpc: select HAVE_CONTEXT_TRACKING for pSeries Li Zhong

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=1359714465-6297-4-git-send-email-zhong@linux.vnet.ibm.com \
    --to=zhong@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    /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;
as well as URLs for NNTP newsgroup(s).