Skip to content

Commit def8cf7

Browse files
oleg-nesterovtorvalds
authored andcommitted
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: Oleg 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 629d362 commit def8cf7

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

kernel/signal.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,20 @@ static int sig_handler_ignored(void __user *handler, int sig)
5858
(handler == SIG_DFL && sig_kernel_ignore(sig));
5959
}
6060

61-
static int sig_task_ignored(struct task_struct *t, int sig,
62-
int from_ancestor_ns)
61+
static int sig_task_ignored(struct task_struct *t, int sig, bool force)
6362
{
6463
void __user *handler;
6564

6665
handler = sig_handler(t, sig);
6766

6867
if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) &&
69-
handler == SIG_DFL && !from_ancestor_ns)
68+
handler == SIG_DFL && !force)
7069
return 1;
7170

7271
return sig_handler_ignored(handler, sig);
7372
}
7473

75-
static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns)
74+
static int sig_ignored(struct task_struct *t, int sig, bool force)
7675
{
7776
/*
7877
* 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)
8281
if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig))
8382
return 0;
8483

85-
if (!sig_task_ignored(t, sig, from_ancestor_ns))
84+
if (!sig_task_ignored(t, sig, force))
8685
return 0;
8786

8887
/*
@@ -855,7 +854,7 @@ static void ptrace_trap_notify(struct task_struct *t)
855854
* Returns true if the signal should be actually delivered, otherwise
856855
* it should be dropped.
857856
*/
858-
static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns)
857+
static int prepare_signal(int sig, struct task_struct *p, bool force)
859858
{
860859
struct signal_struct *signal = p->signal;
861860
struct task_struct *t;
@@ -915,7 +914,7 @@ static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns)
915914
}
916915
}
917916

918-
return !sig_ignored(p, sig, from_ancestor_ns);
917+
return !sig_ignored(p, sig, force);
919918
}
920919

921920
/*
@@ -1602,7 +1601,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
16021601

16031602
ret = 1; /* the signal is ignored */
16041603
result = TRACE_SIGNAL_IGNORED;
1605-
if (!prepare_signal(sig, t, 0))
1604+
if (!prepare_signal(sig, t, false))
16061605
goto out;
16071606

16081607
ret = 0;

0 commit comments

Comments
 (0)