diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2010-02-22 23:51:32 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-23 22:45:26 +0100 |
commit | c6a0dd7ec6fb2d4927979ed4dc562fc5c122d826 (patch) | |
tree | 415f5e04788eb289820685b33dabcc7949d6196b /kernel/ptrace.c | |
parent | parisc: Disable CONFIG_HAVE_ARCH_TRACEHOOK (diff) | |
download | linux-c6a0dd7ec6fb2d4927979ed4dc562fc5c122d826.tar.xz linux-c6a0dd7ec6fb2d4927979ed4dc562fc5c122d826.zip |
ptrace: Fix ptrace_regset() comments and diagnose errors specifically
Return -EINVAL for the bad size and for unrecognized NT_* type in
ptrace_regset() instead of -EIO.
Also update the comments for this ptrace interface with more clarifications.
Requested-by: Roland McGrath <roland@redhat.com>
Requested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <20100222225240.397523600@sbs-t61.sc.intel.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r-- | kernel/ptrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 13b4554d8fbb..42ad8ae729a0 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -537,7 +537,7 @@ static int ptrace_regset(struct task_struct *task, int req, unsigned int type, int regset_no; if (!regset || (kiov->iov_len % regset->size) != 0) - return -EIO; + return -EINVAL; regset_no = regset - view->regsets; kiov->iov_len = min(kiov->iov_len, |