diff options
author | Hartley Sweeten <hartleys@visionengravers.com> | 2009-08-04 18:20:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-08-05 17:06:58 -0400 |
commit | 65a5053b764a42d33b334ba55810bb5b56eb92df (patch) | |
tree | 8c49f1ccee26071d17b401ea42f729e03b2c5a23 /arch/arm/kernel | |
parent | 0a51810aa058a0a4ac76dd6f87f4d10bee774e2e (diff) |
ARM: 5638/1: arch/arm/kernel/signal.c: use correct address space for CRUNCH
preserve_crunch_context() calls __copy_to_user() which expects the
destination address to be in __user space. setup_sigframe() properly
passes the destination address.
restore_crunch_context() calls __copy_from_user() which expects the
source address to be in __user space. restore_sigframe() properly
passes the source address.
This fixes {preserve/restore}_crunch_context() to accept the
address as __user space and resolves the following sparse warnings:
arch/arm/kernel/signal.c:146:31:
warning: incorrect type in argument 1 (different address spaces)
expected void [noderef] <asn:1>*to
got struct crunch_sigframe *frame
arch/arm/kernel/signal.c:156:38:
warning: incorrect type in argument 2 (different address spaces)
expected void const [noderef] <asn:1>*from
got struct crunch_sigframe *frame
arch/arm/kernel/signal.c:250:48:
warning: incorrect type in argument 1 (different address spaces)
expected struct crunch_sigframe *frame
got struct crunch_sigframe [noderef] <asn:1>*<noident>
arch/arm/kernel/signal.c:365:49:
warning: incorrect type in argument 1 (different address spaces)
expected struct crunch_sigframe *frame
got struct crunch_sigframe [noderef] <asn:1>*<noident>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/signal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 93bb4247b7ed..f6bc5d442782 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -133,7 +133,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
133 | } | 133 | } |
134 | 134 | ||
135 | #ifdef CONFIG_CRUNCH | 135 | #ifdef CONFIG_CRUNCH |
136 | static int preserve_crunch_context(struct crunch_sigframe *frame) | 136 | static int preserve_crunch_context(struct crunch_sigframe __user *frame) |
137 | { | 137 | { |
138 | char kbuf[sizeof(*frame) + 8]; | 138 | char kbuf[sizeof(*frame) + 8]; |
139 | struct crunch_sigframe *kframe; | 139 | struct crunch_sigframe *kframe; |
@@ -146,7 +146,7 @@ static int preserve_crunch_context(struct crunch_sigframe *frame) | |||
146 | return __copy_to_user(frame, kframe, sizeof(*frame)); | 146 | return __copy_to_user(frame, kframe, sizeof(*frame)); |
147 | } | 147 | } |
148 | 148 | ||
149 | static int restore_crunch_context(struct crunch_sigframe *frame) | 149 | static int restore_crunch_context(struct crunch_sigframe __user *frame) |
150 | { | 150 | { |
151 | char kbuf[sizeof(*frame) + 8]; | 151 | char kbuf[sizeof(*frame) + 8]; |
152 | struct crunch_sigframe *kframe; | 152 | struct crunch_sigframe *kframe; |