[lkml]   [2009]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/6][v5] Define siginfo_from_ancestor_ns()
Really minor nit, just noticed...

On 12/27, Sukadev Bhattiprolu wrote:
> +static inline int siginfo_from_ancestor_ns(struct task_struct *t,
> + siginfo_t *info)
> +{
> + struct pid_namespace *ns;
> +
> + /*
> + * Ensure signal is from user-space before checking pid namespace.
> + * (We maybe called from interrupt context and dereferencing
> + * pid namespace would be safe).
> + */
> + if (siginfo_from_user(info)) {

I can't parse the comment above, and imho it is confusing and
misleading. We can dereference pid namespace even in interrupt

Also, the comment looks as if "when siginfo_from_user() is false,
it is not safe/possible to derive from_ancestor_ns". This is not
true, in that case we know that from_ancestor_ns must be false.

from_ancestor_ns == T means the signal was sent from the user
space, and it was sent to the task in the sub-namespace, so it
is clear why we check siginfo_from_user().


 \ /
  Last update: 2009-01-05 15:39    [W:0.086 / U:3.140 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site