userns: Don't allow unprivileged creation of gid mappings
[firefly-linux-kernel-4.4.55.git] / kernel / signal.c
index 06ff7764ab7c748fd31634521122b1381af17d73..113411bfe8b1205ad0f26556776f2a317e06eb0c 100644 (file)
@@ -855,12 +855,14 @@ static void ptrace_trap_notify(struct task_struct *t)
  * Returns true if the signal should be actually delivered, otherwise
  * it should be dropped.
  */
-static int prepare_signal(int sig, struct task_struct *p, bool force)
+static bool prepare_signal(int sig, struct task_struct *p, bool force)
 {
        struct signal_struct *signal = p->signal;
        struct task_struct *t;
 
-       if (unlikely(signal->flags & SIGNAL_GROUP_EXIT)) {
+       if (signal->flags & (SIGNAL_GROUP_EXIT | SIGNAL_GROUP_COREDUMP)) {
+               if (signal->flags & SIGNAL_GROUP_COREDUMP)
+                       return sig == SIGKILL;
                /*
                 * The process is in the middle of dying, nothing to do.
                 */
@@ -1161,8 +1163,7 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
 static void print_fatal_signal(int signr)
 {
        struct pt_regs *regs = signal_pt_regs();
-       printk(KERN_INFO "%s/%d: potentially unexpected fatal signal %d.\n",
-               current->comm, task_pid_nr(current), signr);
+       printk(KERN_INFO "potentially unexpected fatal signal %d.\n", signr);
 
 #if defined(__i386__) && !defined(__arch_um__)
        printk(KERN_INFO "code at %08lx: ", regs->ip);