Re: [PATCH] Simplify PTRACE_foo constants and PTRACE_SETOPTIONS code
From: Denys Vlasenko
Date: Thu Sep 08 2011 - 08:13:49 EST
On Thu, Sep 8, 2011 at 2:06 AM, Tejun Heo <tj@xxxxxxxxxx> wrote:
> Hello,
>
> Mostly looks good to me. Just a small nit.
>
> On Wed, Sep 07, 2011 at 11:36:37PM +0200, Denys Vlasenko wrote:
>> static int ptrace_setoptions(struct task_struct *child, unsigned long data)
>> {
>> + unsigned flags;
>>
>> + if (data & ~(long)PTRACE_O_MASK) {
>
> Can we use (unsigned long) here? Signed extensions have a nasty way
> of sneaking up on you.
Ok.
>> + child->ptrace &= ~PT_TRACE_MASK; /* historical bug */
>
> And it would be great if it explains what the historical bug was and
> what the intended behavior is.
I'd rather nuke the bug in a follow-up patch (by deleting this line).
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/