aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2015-05-01 00:19:57 -0400
committerIngo Molnar <mingo@kernel.org>2015-05-08 06:04:36 -0400
commitb76808e6808e34e7e78131d2b8cb0535622b8e9f (patch)
tree6a5fad5eb7c7ec1aa78ae2deb9ff238701929162 /kernel/signal.c
parent3289bdb429884c0279bf9ab72dff7b934f19dfc6 (diff)
signals, sched: Change all uses of JOBCTL_* from 'int' to 'long'
c56fb6564dcd ("Fix a misaligned load inside ptrace_attach()") makes jobctl an "unsigned long". It makes sense to have the masks applied to it match that type. This is currently just a cosmetic change, but it will prevent the mask from being unexpectedly truncated if we ever end up with masks with more bits. One instance of "signr" is an int, but I left this alone because the mask ensures that it will never overflow. Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Chris Metcalf <cmetcalf@ezchip.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Borislav Petkov <bp@alien8.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: bobby.prani@gmail.com Cc: oleg@redhat.com Cc: paulmck@linux.vnet.ibm.com Cc: richard@nod.at Cc: vdavydov@parallels.com Link: http://lkml.kernel.org/r/1430453997-32459-4-git-send-email-palmer@dabbelt.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index d51c5ddd855c..f19833b5db3c 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -245,7 +245,7 @@ static inline void print_dropped_signal(int sig)
245 * RETURNS: 245 * RETURNS:
246 * %true if @mask is set, %false if made noop because @task was dying. 246 * %true if @mask is set, %false if made noop because @task was dying.
247 */ 247 */
248bool task_set_jobctl_pending(struct task_struct *task, unsigned int mask) 248bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask)
249{ 249{
250 BUG_ON(mask & ~(JOBCTL_PENDING_MASK | JOBCTL_STOP_CONSUME | 250 BUG_ON(mask & ~(JOBCTL_PENDING_MASK | JOBCTL_STOP_CONSUME |
251 JOBCTL_STOP_SIGMASK | JOBCTL_TRAPPING)); 251 JOBCTL_STOP_SIGMASK | JOBCTL_TRAPPING));
@@ -297,7 +297,7 @@ void task_clear_jobctl_trapping(struct task_struct *task)
297 * CONTEXT: 297 * CONTEXT:
298 * Must be called with @task->sighand->siglock held. 298 * Must be called with @task->sighand->siglock held.
299 */ 299 */
300void task_clear_jobctl_pending(struct task_struct *task, unsigned int mask) 300void task_clear_jobctl_pending(struct task_struct *task, unsigned long mask)
301{ 301{
302 BUG_ON(mask & ~JOBCTL_PENDING_MASK); 302 BUG_ON(mask & ~JOBCTL_PENDING_MASK);
303 303
@@ -2000,7 +2000,7 @@ static bool do_signal_stop(int signr)
2000 struct signal_struct *sig = current->signal; 2000 struct signal_struct *sig = current->signal;
2001 2001
2002 if (!(current->jobctl & JOBCTL_STOP_PENDING)) { 2002 if (!(current->jobctl & JOBCTL_STOP_PENDING)) {
2003 unsigned int gstop = JOBCTL_STOP_PENDING | JOBCTL_STOP_CONSUME; 2003 unsigned long gstop = JOBCTL_STOP_PENDING | JOBCTL_STOP_CONSUME;
2004 struct task_struct *t; 2004 struct task_struct *t;
2005 2005
2006 /* signr will be recorded in task->jobctl for retries */ 2006 /* signr will be recorded in task->jobctl for retries */