lkml.org 
[lkml]   [2011]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2011-09-09 01:37    [W:2.246 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site