diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:52:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:52:26 -0400 |
commit | ccaa36f73544163ef6e15eb29a620130755f6001 (patch) | |
tree | b5cf50592c45e25edbd66fea451e6941e455fa83 /arch/powerpc/oprofile/backtrace.c | |
parent | b4a9071af62f95dc6d22040a0b37ac7225ce4d54 (diff) | |
parent | 5e980823581682d1566e7b5089cf827ddd5f3c94 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits)
[POWERPC] Fix rheap alignment problem
[POWERPC] Use check_legacy_ioport() for ISAPnP
[POWERPC] Avoid NULL pointer in gpio1_interrupt
[POWERPC] Enable generic rtc hook for the MPC8349 mITX
[POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class
[POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot
[POWERPC] fix spin lock nesting in hvc_iseries
[POWERPC] EEH failure to mark pci slot as frozen.
[POWERPC] update powerpc defconfig files after libata kconfig breakage
[POWERPC] enable sysrq in pmac32_defconfig
[POWERPC] UPIO_TSI cleanup
[POWERPC] rewrite mkprep and mkbugboot in sane C
[POWERPC] maple/pci iomem annotations
[POWERPC] powerpc oprofile __user annotations
[POWERPC] cell spufs iomem annotations
[POWERPC] NULL noise removal: spufs
[POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c
[POWERPC] update mpc8349_itx_defconfig and remove some debug settings
[POWERPC] Always call cede in pseries dedicated idle loop
[POWERPC] Fix loop logic in irq_alloc_virt()
...
Diffstat (limited to 'arch/powerpc/oprofile/backtrace.c')
-rw-r--r-- | arch/powerpc/oprofile/backtrace.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/powerpc/oprofile/backtrace.c b/arch/powerpc/oprofile/backtrace.c index 75f57bc96b40..b4278cfd1f80 100644 --- a/arch/powerpc/oprofile/backtrace.c +++ b/arch/powerpc/oprofile/backtrace.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <asm/processor.h> | 12 | #include <asm/processor.h> |
13 | #include <asm/uaccess.h> | 13 | #include <asm/uaccess.h> |
14 | #include <asm/compat.h> | ||
14 | 15 | ||
15 | #define STACK_SP(STACK) *(STACK) | 16 | #define STACK_SP(STACK) *(STACK) |
16 | 17 | ||
@@ -26,8 +27,9 @@ | |||
26 | static unsigned int user_getsp32(unsigned int sp, int is_first) | 27 | static unsigned int user_getsp32(unsigned int sp, int is_first) |
27 | { | 28 | { |
28 | unsigned int stack_frame[2]; | 29 | unsigned int stack_frame[2]; |
30 | void __user *p = compat_ptr(sp); | ||
29 | 31 | ||
30 | if (!access_ok(VERIFY_READ, sp, sizeof(stack_frame))) | 32 | if (!access_ok(VERIFY_READ, p, sizeof(stack_frame))) |
31 | return 0; | 33 | return 0; |
32 | 34 | ||
33 | /* | 35 | /* |
@@ -35,8 +37,7 @@ static unsigned int user_getsp32(unsigned int sp, int is_first) | |||
35 | * which means that we've done all that we can do from | 37 | * which means that we've done all that we can do from |
36 | * interrupt context. | 38 | * interrupt context. |
37 | */ | 39 | */ |
38 | if (__copy_from_user_inatomic(stack_frame, (void *)(long)sp, | 40 | if (__copy_from_user_inatomic(stack_frame, p, sizeof(stack_frame))) |
39 | sizeof(stack_frame))) | ||
40 | return 0; | 41 | return 0; |
41 | 42 | ||
42 | if (!is_first) | 43 | if (!is_first) |
@@ -54,10 +55,10 @@ static unsigned long user_getsp64(unsigned long sp, int is_first) | |||
54 | { | 55 | { |
55 | unsigned long stack_frame[3]; | 56 | unsigned long stack_frame[3]; |
56 | 57 | ||
57 | if (!access_ok(VERIFY_READ, sp, sizeof(stack_frame))) | 58 | if (!access_ok(VERIFY_READ, (void __user *)sp, sizeof(stack_frame))) |
58 | return 0; | 59 | return 0; |
59 | 60 | ||
60 | if (__copy_from_user_inatomic(stack_frame, (void *)sp, | 61 | if (__copy_from_user_inatomic(stack_frame, (void __user *)sp, |
61 | sizeof(stack_frame))) | 62 | sizeof(stack_frame))) |
62 | return 0; | 63 | return 0; |
63 | 64 | ||