Skip to content

Commit 3cf5d07

Browse files
committed
signal: Remove task parameter from force_sig
All of the remaining callers pass current into force_sig so remove the task parameter to make this obvious and to make misuse more difficult in the future. This also makes it clear force_sig passes current into force_sig_info. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
1 parent cb44c9a commit 3cf5d07

76 files changed

Lines changed: 160 additions & 166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/alpha/kernel/signal.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ do_sigreturn(struct sigcontext __user *sc)
225225
return;
226226

227227
give_sigsegv:
228-
force_sig(SIGSEGV, current);
228+
force_sig(SIGSEGV);
229229
}
230230

231231
asmlinkage void
@@ -253,7 +253,7 @@ do_rt_sigreturn(struct rt_sigframe __user *frame)
253253
return;
254254

255255
give_sigsegv:
256-
force_sig(SIGSEGV, current);
256+
force_sig(SIGSEGV);
257257
}
258258

259259

‎arch/arc/kernel/process.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
100100
goto again;
101101

102102
fail:
103-
force_sig(SIGSEGV, current);
103+
force_sig(SIGSEGV);
104104
return ret;
105105
}
106106

‎arch/arc/kernel/signal.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ SYSCALL_DEFINE0(rt_sigreturn)
197197
return regs->r0;
198198

199199
badframe:
200-
force_sig(SIGSEGV, current);
200+
force_sig(SIGSEGV);
201201
return 0;
202202
}
203203

‎arch/arm/kernel/signal.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
250250
return regs->ARM_r0;
251251

252252
badframe:
253-
force_sig(SIGSEGV, current);
253+
force_sig(SIGSEGV);
254254
return 0;
255255
}
256256

@@ -283,7 +283,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
283283
return regs->ARM_r0;
284284

285285
badframe:
286-
force_sig(SIGSEGV, current);
286+
force_sig(SIGSEGV);
287287
return 0;
288288
}
289289

‎arch/arm64/kernel/traps.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ void arm64_force_sig_fault(int signo, int code, void __user *addr,
257257
{
258258
arm64_show_signal(signo, str);
259259
if (signo == SIGKILL)
260-
force_sig(SIGKILL, current);
260+
force_sig(SIGKILL);
261261
else
262262
force_sig_fault(signo, code, addr, current);
263263
}

‎arch/c6x/kernel/signal.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs)
9393
return regs->a4;
9494

9595
badframe:
96-
force_sig(SIGSEGV, current);
96+
force_sig(SIGSEGV);
9797
return 0;
9898
}
9999

‎arch/csky/kernel/signal.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ SYSCALL_DEFINE0(rt_sigreturn)
6161
{
6262
struct pt_regs *regs = current_pt_regs();
6363
struct rt_sigframe __user *frame;
64-
struct task_struct *task;
6564
sigset_t set;
6665

6766
/* Always make any pending restarted system calls return -EINTR */
@@ -86,8 +85,7 @@ SYSCALL_DEFINE0(rt_sigreturn)
8685
return regs->a0;
8786

8887
badframe:
89-
task = current;
90-
force_sig(SIGSEGV, task);
88+
force_sig(SIGSEGV);
9189
return 0;
9290
}
9391

‎arch/h8300/kernel/ptrace_h.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ asmlinkage void trace_trap(unsigned long bp)
250250
{
251251
if ((unsigned long)current->thread.breakinfo.addr == bp) {
252252
user_disable_single_step(current);
253-
force_sig(SIGTRAP, current);
253+
force_sig(SIGTRAP);
254254
} else
255-
force_sig(SIGILL, current);
255+
force_sig(SIGILL);
256256
}

‎arch/h8300/kernel/ptrace_s.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ void user_enable_single_step(struct task_struct *child)
4040
asmlinkage void trace_trap(unsigned long bp)
4141
{
4242
(void)bp;
43-
force_sig(SIGTRAP, current);
43+
force_sig(SIGTRAP);
4444
}

‎arch/h8300/kernel/signal.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ asmlinkage int sys_rt_sigreturn(void)
126126
return er0;
127127

128128
badframe:
129-
force_sig(SIGSEGV, current);
129+
force_sig(SIGSEGV);
130130
return 0;
131131
}
132132

0 commit comments

Comments
 (0)