Re: [PATCH v3] ptrace: Fix fork event messages across pid namespaces

From: Matthew Dempsky
Date: Wed Apr 02 2014 - 18:38:05 EST


On Wed, Apr 2, 2014 at 2:58 PM, Matthew Dempsky <mdempsky@xxxxxxxxxx> wrote:
> Otherwise, it looks like (e.g.) the attempts to get the parent's pid
> in fill_prstatus() and tomoyo_sys_getppid() are also theoretical races
> of the same kind?

Doh, nevermind, those functions would potentially be use null "struct
pid" pointers, not "struct pid_namespace" pointers; and pid_nr_ns()
guards against pid being null.

Okay, I think I understand now why guarding against the
task_parent_pid_ns() here is consistent with other RCU code. I'll
send a revised patch that does that.

Also, it looks like "0" is the conventional value for unrepresentable
pid_t values, so I'll change to do that too.
--
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/