diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-09-12 20:03:31 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-14 09:35:52 -0400 |
commit | e6babb6b7fed93c93f8fc5ef8ebd3a474fc2df3e (patch) | |
tree | b023487fb2b29e22663c69afc065c7a26f958760 | |
parent | 2ba48e16e78216bb5b9fd08a088bfefda478df25 (diff) |
x86: signal: introduce do_rt_sigreturn()
introduce do_rt_sigreturn(), to collect common part of sys_rt_sigreturn().
No change in functionality intended.
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/signal_32.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/signal_64.c | 11 |
2 files changed, 17 insertions, 6 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index d433861a6599..da3cf3270f83 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -215,9 +215,8 @@ badframe: | |||
215 | return 0; | 215 | return 0; |
216 | } | 216 | } |
217 | 217 | ||
218 | asmlinkage int sys_rt_sigreturn(unsigned long __unused) | 218 | static long do_rt_sigreturn(struct pt_regs *regs) |
219 | { | 219 | { |
220 | struct pt_regs *regs = (struct pt_regs *)&__unused; | ||
221 | struct rt_sigframe __user *frame; | 220 | struct rt_sigframe __user *frame; |
222 | unsigned long ax; | 221 | unsigned long ax; |
223 | sigset_t set; | 222 | sigset_t set; |
@@ -243,10 +242,17 @@ asmlinkage int sys_rt_sigreturn(unsigned long __unused) | |||
243 | return ax; | 242 | return ax; |
244 | 243 | ||
245 | badframe: | 244 | badframe: |
246 | signal_fault(regs, frame, "rt sigreturn"); | 245 | signal_fault(regs, frame, "rt_sigreturn"); |
247 | return 0; | 246 | return 0; |
248 | } | 247 | } |
249 | 248 | ||
249 | asmlinkage int sys_rt_sigreturn(unsigned long __unused) | ||
250 | { | ||
251 | struct pt_regs *regs = (struct pt_regs *)&__unused; | ||
252 | |||
253 | return do_rt_sigreturn(regs); | ||
254 | } | ||
255 | |||
250 | /* | 256 | /* |
251 | * Set up a signal frame. | 257 | * Set up a signal frame. |
252 | */ | 258 | */ |
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index a21c85197295..bf77d4789a2d 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -104,11 +104,11 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, | |||
104 | return err; | 104 | return err; |
105 | } | 105 | } |
106 | 106 | ||
107 | asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | 107 | static long do_rt_sigreturn(struct pt_regs *regs) |
108 | { | 108 | { |
109 | struct rt_sigframe __user *frame; | 109 | struct rt_sigframe __user *frame; |
110 | sigset_t set; | ||
111 | unsigned long ax; | 110 | unsigned long ax; |
111 | sigset_t set; | ||
112 | 112 | ||
113 | frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long)); | 113 | frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long)); |
114 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 114 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
@@ -131,10 +131,15 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | |||
131 | return ax; | 131 | return ax; |
132 | 132 | ||
133 | badframe: | 133 | badframe: |
134 | signal_fault(regs, frame, "sigreturn"); | 134 | signal_fault(regs, frame, "rt_sigreturn"); |
135 | return 0; | 135 | return 0; |
136 | } | 136 | } |
137 | 137 | ||
138 | asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | ||
139 | { | ||
140 | return do_rt_sigreturn(regs); | ||
141 | } | ||
142 | |||
138 | /* | 143 | /* |
139 | * Set up a signal frame. | 144 | * Set up a signal frame. |
140 | */ | 145 | */ |