Commit def8cf72 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

signal: cosmetic, s/from_ancestor_ns/force/ in prepare_signal() paths

Cosmetic, rename the from_ancestor_ns argument in prepare_signal()
paths.  After the previous change it doesn't match the reality.
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Anton Vorontsov <anton.vorontsov@linaro.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 629d362b
...@@ -58,21 +58,20 @@ static int sig_handler_ignored(void __user *handler, int sig) ...@@ -58,21 +58,20 @@ static int sig_handler_ignored(void __user *handler, int sig)
(handler == SIG_DFL && sig_kernel_ignore(sig)); (handler == SIG_DFL && sig_kernel_ignore(sig));
} }
static int sig_task_ignored(struct task_struct *t, int sig, static int sig_task_ignored(struct task_struct *t, int sig, bool force)
int from_ancestor_ns)
{ {
void __user *handler; void __user *handler;
handler = sig_handler(t, sig); handler = sig_handler(t, sig);
if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) && if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) &&
handler == SIG_DFL && !from_ancestor_ns) handler == SIG_DFL && !force)
return 1; return 1;
return sig_handler_ignored(handler, sig); return sig_handler_ignored(handler, sig);
} }
static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns) static int sig_ignored(struct task_struct *t, int sig, bool force)
{ {
/* /*
* Blocked signals are never ignored, since the * Blocked signals are never ignored, since the
...@@ -82,7 +81,7 @@ static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns) ...@@ -82,7 +81,7 @@ static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns)
if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig)) if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig))
return 0; return 0;
if (!sig_task_ignored(t, sig, from_ancestor_ns)) if (!sig_task_ignored(t, sig, force))
return 0; return 0;
/* /*
...@@ -855,7 +854,7 @@ static void ptrace_trap_notify(struct task_struct *t) ...@@ -855,7 +854,7 @@ static void ptrace_trap_notify(struct task_struct *t)
* Returns true if the signal should be actually delivered, otherwise * Returns true if the signal should be actually delivered, otherwise
* it should be dropped. * it should be dropped.
*/ */
static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns) static int prepare_signal(int sig, struct task_struct *p, bool force)
{ {
struct signal_struct *signal = p->signal; struct signal_struct *signal = p->signal;
struct task_struct *t; struct task_struct *t;
...@@ -915,7 +914,7 @@ static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns) ...@@ -915,7 +914,7 @@ static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns)
} }
} }
return !sig_ignored(p, sig, from_ancestor_ns); return !sig_ignored(p, sig, force);
} }
/* /*
...@@ -1602,7 +1601,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) ...@@ -1602,7 +1601,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
ret = 1; /* the signal is ignored */ ret = 1; /* the signal is ignored */
result = TRACE_SIGNAL_IGNORED; result = TRACE_SIGNAL_IGNORED;
if (!prepare_signal(sig, t, 0)) if (!prepare_signal(sig, t, false))
goto out; goto out;
ret = 0; ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment