aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-03-23 18:02:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:58:41 -0400
commitdef8cf72562e17ec8316ce0cb5697c7afd6400e3 (patch)
treede0ee350a81685eddadcbfc8d29545e0f7a01d05 /kernel/signal.c
parent629d362b9950166c6fac2aa8425db34d824bb043 (diff)
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>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 2584f5a91fbe..d523da02dd14 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -58,21 +58,20 @@ static int sig_handler_ignored(void __user *handler, int sig)
58 (handler == SIG_DFL && sig_kernel_ignore(sig)); 58 (handler == SIG_DFL && sig_kernel_ignore(sig));
59} 59}
60 60
61static int sig_task_ignored(struct task_struct *t, int sig, 61static int sig_task_ignored(struct task_struct *t, int sig, bool force)
62 int from_ancestor_ns)
63{ 62{
64 void __user *handler; 63 void __user *handler;
65 64
66 handler = sig_handler(t, sig); 65 handler = sig_handler(t, sig);
67 66
68 if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) && 67 if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) &&
69 handler == SIG_DFL && !from_ancestor_ns) 68 handler == SIG_DFL && !force)
70 return 1; 69 return 1;
71 70
72 return sig_handler_ignored(handler, sig); 71 return sig_handler_ignored(handler, sig);
73} 72}
74 73
75static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns) 74static int sig_ignored(struct task_struct *t, int sig, bool force)
76{ 75{
77 /* 76 /*
78 * Blocked signals are never ignored, since the 77 * 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 if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig)) 81 if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig))
83 return 0; 82 return 0;
84 83
85 if (!sig_task_ignored(t, sig, from_ancestor_ns)) 84 if (!sig_task_ignored(t, sig, force))
86 return 0; 85 return 0;
87 86
88 /* 87 /*
@@ -855,7 +854,7 @@ static void ptrace_trap_notify(struct task_struct *t)
855 * Returns true if the signal should be actually delivered, otherwise 854 * Returns true if the signal should be actually delivered, otherwise
856 * it should be dropped. 855 * it should be dropped.
857 */ 856 */
858static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns) 857static int prepare_signal(int sig, struct task_struct *p, bool force)
859{ 858{
860 struct signal_struct *signal = p->signal; 859 struct signal_struct *signal = p->signal;
861 struct task_struct *t; 860 struct task_struct *t;
@@ -915,7 +914,7 @@ static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns)
915 } 914 }
916 } 915 }
917 916
918 return !sig_ignored(p, sig, from_ancestor_ns); 917 return !sig_ignored(p, sig, force);
919} 918}
920 919
921/* 920/*
@@ -1602,7 +1601,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
1602 1601
1603 ret = 1; /* the signal is ignored */ 1602 ret = 1; /* the signal is ignored */
1604 result = TRACE_SIGNAL_IGNORED; 1603 result = TRACE_SIGNAL_IGNORED;
1605 if (!prepare_signal(sig, t, 0)) 1604 if (!prepare_signal(sig, t, false))
1606 goto out; 1605 goto out;
1607 1606
1608 ret = 0; 1607 ret = 0;