Messages in this thread | | | Date | Thu, 8 Sep 2011 20:42:15 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH v3] Simplify PTRACE_foo constants and PTRACE_SETOPTIONS code |
| |
On 09/08, Denys Vlasenko wrote: > > static int ptrace_setoptions(struct task_struct *child, unsigned long data) > { > ... > + if (data & ~(unsigned long)PTRACE_O_MASK) { > + child->ptrace &= ~PT_TRACE_MASK; /* historical bug */ > + return -EINVAL; > + }
This is not right. You shouldn't simply return with -EINVAL, this change adds another bug. Note that the cuurrent code sets the new bits even if it returns -EINVAL.
Oleg.
| |