|
@@ -528,6 +528,9 @@ int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long ds
|
|
|
|
|
|
|
|
static int ptrace_setoptions(struct task_struct *child, unsigned long data)
|
|
static int ptrace_setoptions(struct task_struct *child, unsigned long data)
|
|
|
{
|
|
{
|
|
|
|
|
+ if (data & ~(unsigned long)PTRACE_O_MASK)
|
|
|
|
|
+ return -EINVAL;
|
|
|
|
|
+
|
|
|
child->ptrace &= ~PT_TRACE_MASK;
|
|
child->ptrace &= ~PT_TRACE_MASK;
|
|
|
|
|
|
|
|
if (data & PTRACE_O_TRACESYSGOOD)
|
|
if (data & PTRACE_O_TRACESYSGOOD)
|
|
@@ -551,7 +554,7 @@ static int ptrace_setoptions(struct task_struct *child, unsigned long data)
|
|
|
if (data & PTRACE_O_TRACEEXIT)
|
|
if (data & PTRACE_O_TRACEEXIT)
|
|
|
child->ptrace |= PT_TRACE_EXIT;
|
|
child->ptrace |= PT_TRACE_EXIT;
|
|
|
|
|
|
|
|
- return (data & ~PTRACE_O_MASK) ? -EINVAL : 0;
|
|
|
|
|
|
|
+ return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static int ptrace_getsiginfo(struct task_struct *child, siginfo_t *info)
|
|
static int ptrace_getsiginfo(struct task_struct *child, siginfo_t *info)
|