KVM: set_memory_region: Drop user_alloc from prepare/commit_memory_region()
[pandora-kernel.git] / kernel / signal.c
index 2a7ae29..2ec870a 100644 (file)
@@ -1157,11 +1157,11 @@ 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("%s/%d: potentially unexpected fatal signal %d.\n",
+       printk(KERN_INFO "%s/%d: potentially unexpected fatal signal %d.\n",
                current->comm, task_pid_nr(current), signr);
 
 #if defined(__i386__) && !defined(__arch_um__)
-       printk("code at %08lx: ", regs->ip);
+       printk(KERN_INFO "code at %08lx: ", regs->ip);
        {
                int i;
                for (i = 0; i < 16; i++) {
@@ -1169,11 +1169,11 @@ static void print_fatal_signal(int signr)
 
                        if (get_user(insn, (unsigned char *)(regs->ip + i)))
                                break;
-                       printk("%02x ", insn);
+                       printk(KERN_CONT "%02x ", insn);
                }
        }
+       printk(KERN_CONT "\n");
 #endif
-       printk("\n");
        preempt_disable();
        show_regs(regs);
        preempt_enable();
@@ -2653,7 +2653,7 @@ COMPAT_SYSCALL_DEFINE4(rt_sigprocmask, int, how, compat_sigset_t __user *, nset,
        if (oset) {
                compat_sigset_t old32;
                sigset_to_compat(&old32, &old_set);
-               if (copy_to_user(oset, &old_set, sizeof(sigset_t)))
+               if (copy_to_user(oset, &old32, sizeof(compat_sigset_t)))
                        return -EFAULT;
        }
        return 0;
@@ -2996,7 +2996,8 @@ static int do_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t *info)
        /* Not even root can pretend to send signals from the kernel.
         * Nor can they impersonate a kill()/tgkill(), which adds source info.
         */
-       if (info->si_code >= 0 || info->si_code == SI_TKILL) {
+       if ((info->si_code >= 0 || info->si_code == SI_TKILL) &&
+           (task_pid_vnr(current) != pid)) {
                /* We used to allow any < 0 si_code */
                WARN_ON_ONCE(info->si_code < 0);
                return -EPERM;
@@ -3045,7 +3046,8 @@ static int do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info)
        /* Not even root can pretend to send signals from the kernel.
         * Nor can they impersonate a kill()/tgkill(), which adds source info.
         */
-       if (info->si_code >= 0 || info->si_code == SI_TKILL) {
+       if (((info->si_code >= 0 || info->si_code == SI_TKILL)) &&
+           (task_pid_vnr(current) != pid)) {
                /* We used to allow any < 0 si_code */
                WARN_ON_ONCE(info->si_code < 0);
                return -EPERM;