diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:42:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:42:52 -0400 |
commit | 17bb51d56cdc8cbf252031db3107de034cfeb44c (patch) | |
tree | f9fb2c16b29a152d3413fa0028e660e3b6146584 /arch/x86/kernel | |
parent | 0671b7674f42ab3a200401ea0e48d6f47d34acae (diff) | |
parent | 95aac7b1cd224f568fb83937044cd303ff11b029 (diff) |
Merge branch 'akpm-incoming-2'
* akpm-incoming-2: (139 commits)
epoll: make epoll_wait() use the hrtimer range feature
select: rename estimate_accuracy() to select_estimate_accuracy()
Remove duplicate includes from many files
ramoops: use the platform data structure instead of module params
kernel/resource.c: handle reinsertion of an already-inserted resource
kfifo: fix kfifo_alloc() to return a signed int value
w1: don't allow arbitrary users to remove w1 devices
alpha: remove dma64_addr_t usage
mips: remove dma64_addr_t usage
sparc: remove dma64_addr_t usage
fuse: use release_pages()
taskstats: use real microsecond granularity for CPU times
taskstats: split fill_pid function
taskstats: separate taskstats commands
delayacct: align to 8 byte boundary on 64-bit systems
delay-accounting: reimplement -c for getdelays.c to report information on a target command
namespaces Kconfig: move namespace menu location after the cgroup
namespaces Kconfig: remove the cgroup device whitelist experimental tag
namespaces Kconfig: remove pointless cgroup dependency
namespaces Kconfig: make namespace a submenu
...
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/ptrace.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 70c4872cd8aa..45892dc4b72a 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -801,7 +801,8 @@ void ptrace_disable(struct task_struct *child) | |||
801 | static const struct user_regset_view user_x86_32_view; /* Initialized below. */ | 801 | static const struct user_regset_view user_x86_32_view; /* Initialized below. */ |
802 | #endif | 802 | #endif |
803 | 803 | ||
804 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 804 | long arch_ptrace(struct task_struct *child, long request, |
805 | unsigned long addr, unsigned long data) | ||
805 | { | 806 | { |
806 | int ret; | 807 | int ret; |
807 | unsigned long __user *datap = (unsigned long __user *)data; | 808 | unsigned long __user *datap = (unsigned long __user *)data; |
@@ -812,8 +813,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
812 | unsigned long tmp; | 813 | unsigned long tmp; |
813 | 814 | ||
814 | ret = -EIO; | 815 | ret = -EIO; |
815 | if ((addr & (sizeof(data) - 1)) || addr < 0 || | 816 | if ((addr & (sizeof(data) - 1)) || addr >= sizeof(struct user)) |
816 | addr >= sizeof(struct user)) | ||
817 | break; | 817 | break; |
818 | 818 | ||
819 | tmp = 0; /* Default return condition */ | 819 | tmp = 0; /* Default return condition */ |
@@ -830,8 +830,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
830 | 830 | ||
831 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ | 831 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ |
832 | ret = -EIO; | 832 | ret = -EIO; |
833 | if ((addr & (sizeof(data) - 1)) || addr < 0 || | 833 | if ((addr & (sizeof(data) - 1)) || addr >= sizeof(struct user)) |
834 | addr >= sizeof(struct user)) | ||
835 | break; | 834 | break; |
836 | 835 | ||
837 | if (addr < sizeof(struct user_regs_struct)) | 836 | if (addr < sizeof(struct user_regs_struct)) |
@@ -888,17 +887,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
888 | 887 | ||
889 | #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION | 888 | #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION |
890 | case PTRACE_GET_THREAD_AREA: | 889 | case PTRACE_GET_THREAD_AREA: |
891 | if (addr < 0) | 890 | if ((int) addr < 0) |
892 | return -EIO; | 891 | return -EIO; |
893 | ret = do_get_thread_area(child, addr, | 892 | ret = do_get_thread_area(child, addr, |
894 | (struct user_desc __user *) data); | 893 | (struct user_desc __user *)data); |
895 | break; | 894 | break; |
896 | 895 | ||
897 | case PTRACE_SET_THREAD_AREA: | 896 | case PTRACE_SET_THREAD_AREA: |
898 | if (addr < 0) | 897 | if ((int) addr < 0) |
899 | return -EIO; | 898 | return -EIO; |
900 | ret = do_set_thread_area(child, addr, | 899 | ret = do_set_thread_area(child, addr, |
901 | (struct user_desc __user *) data, 0); | 900 | (struct user_desc __user *)data, 0); |
902 | break; | 901 | break; |
903 | #endif | 902 | #endif |
904 | 903 | ||