[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110908184215.GA29439@redhat.com>
Date: Thu, 8 Sep 2011 20:42:15 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org,
Denys Vlasenko <vda.linux@...glemail.com>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists