aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 2a7ae2963185..2676aac4103d 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1157,11 +1157,11 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
1157static void print_fatal_signal(int signr) 1157static void print_fatal_signal(int signr)
1158{ 1158{
1159 struct pt_regs *regs = signal_pt_regs(); 1159 struct pt_regs *regs = signal_pt_regs();
1160 printk("%s/%d: potentially unexpected fatal signal %d.\n", 1160 printk(KERN_INFO "%s/%d: potentially unexpected fatal signal %d.\n",
1161 current->comm, task_pid_nr(current), signr); 1161 current->comm, task_pid_nr(current), signr);
1162 1162
1163#if defined(__i386__) && !defined(__arch_um__) 1163#if defined(__i386__) && !defined(__arch_um__)
1164 printk("code at %08lx: ", regs->ip); 1164 printk(KERN_INFO "code at %08lx: ", regs->ip);
1165 { 1165 {
1166 int i; 1166 int i;
1167 for (i = 0; i < 16; i++) { 1167 for (i = 0; i < 16; i++) {
@@ -1169,11 +1169,11 @@ static void print_fatal_signal(int signr)
1169 1169
1170 if (get_user(insn, (unsigned char *)(regs->ip + i))) 1170 if (get_user(insn, (unsigned char *)(regs->ip + i)))
1171 break; 1171 break;
1172 printk("%02x ", insn); 1172 printk(KERN_CONT "%02x ", insn);
1173 } 1173 }
1174 } 1174 }
1175 printk(KERN_CONT "\n");
1175#endif 1176#endif
1176 printk("\n");
1177 preempt_disable(); 1177 preempt_disable();
1178 show_regs(regs); 1178 show_regs(regs);
1179 preempt_enable(); 1179 preempt_enable();
@@ -2996,7 +2996,8 @@ static int do_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t *info)
2996 /* Not even root can pretend to send signals from the kernel. 2996 /* Not even root can pretend to send signals from the kernel.
2997 * Nor can they impersonate a kill()/tgkill(), which adds source info. 2997 * Nor can they impersonate a kill()/tgkill(), which adds source info.
2998 */ 2998 */
2999 if (info->si_code >= 0 || info->si_code == SI_TKILL) { 2999 if ((info->si_code >= 0 || info->si_code == SI_TKILL) &&
3000 (task_pid_vnr(current) != pid)) {
3000 /* We used to allow any < 0 si_code */ 3001 /* We used to allow any < 0 si_code */
3001 WARN_ON_ONCE(info->si_code < 0); 3002 WARN_ON_ONCE(info->si_code < 0);
3002 return -EPERM; 3003 return -EPERM;
@@ -3045,7 +3046,8 @@ static int do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info)
3045 /* Not even root can pretend to send signals from the kernel. 3046 /* Not even root can pretend to send signals from the kernel.
3046 * Nor can they impersonate a kill()/tgkill(), which adds source info. 3047 * Nor can they impersonate a kill()/tgkill(), which adds source info.
3047 */ 3048 */
3048 if (info->si_code >= 0 || info->si_code == SI_TKILL) { 3049 if (((info->si_code >= 0 || info->si_code == SI_TKILL)) &&
3050 (task_pid_vnr(current) != pid)) {
3049 /* We used to allow any < 0 si_code */ 3051 /* We used to allow any < 0 si_code */
3050 WARN_ON_ONCE(info->si_code < 0); 3052 WARN_ON_ONCE(info->si_code < 0);
3051 return -EPERM; 3053 return -EPERM;