]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/sys.c
Merge tag 'upstream-3.11-rc1' of git://git.infradead.org/linux-ubifs
[karo-tx-linux.git] / kernel / sys.c
index 2bbd9a73b54c27b0e75eb651d931f0987ff870ed..071de900c824540abd7e42ee942e2ed89767643b 100644 (file)
@@ -511,7 +511,7 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd,
        case LINUX_REBOOT_CMD_HALT:
                kernel_halt();
                do_exit(0);
-               panic("cannot halt");
+               panic("cannot halt.\n");
 
        case LINUX_REBOOT_CMD_POWER_OFF:
                kernel_power_off();
@@ -1309,6 +1309,17 @@ out:
        return retval;
 }
 
+static void set_special_pids(struct pid *pid)
+{
+       struct task_struct *curr = current->group_leader;
+
+       if (task_session(curr) != pid)
+               change_pid(curr, PIDTYPE_SID, pid);
+
+       if (task_pgrp(curr) != pid)
+               change_pid(curr, PIDTYPE_PGID, pid);
+}
+
 SYSCALL_DEFINE0(setsid)
 {
        struct task_struct *group_leader = current->group_leader;
@@ -1328,7 +1339,7 @@ SYSCALL_DEFINE0(setsid)
                goto out;
 
        group_leader->signal->leader = 1;
-       __set_special_pids(sid);
+       set_special_pids(sid);
 
        proc_clear_tty(group_leader);
 
@@ -2355,8 +2366,7 @@ static int do_sysinfo(struct sysinfo *info)
 
        memset(info, 0, sizeof(struct sysinfo));
 
-       ktime_get_ts(&tp);
-       monotonic_to_bootbased(&tp);
+       get_monotonic_boottime(&tp);
        info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0);
 
        get_avenrun(info->loads, 0, SI_LOAD_SHIFT - FSHIFT);