diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 20:12:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 20:12:13 -0400 |
commit | 7f0ef0267e20d62d45d527911a993b1e998f4968 (patch) | |
tree | de51abc7da5903f59d83e23937f22420164c9477 /kernel/sys.c | |
parent | 862f0012549110d6f2586bf54b52ed4540cbff3a (diff) | |
parent | 9307c29524502c21f0e8a6d96d850b2f5bc0bd9a (diff) |
Merge branch 'akpm' (updates from Andrew Morton)
Merge first patch-bomb from Andrew Morton:
- various misc bits
- I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
distracted. There has been quite a bit of activity.
- About half the MM queue
- Some backlight bits
- Various lib/ updates
- checkpatch updates
- zillions more little rtc patches
- ptrace
- signals
- exec
- procfs
- rapidio
- nbd
- aoe
- pps
- memstick
- tools/testing/selftests updates
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (445 commits)
tools/testing/selftests: don't assume the x bit is set on scripts
selftests: add .gitignore for kcmp
selftests: fix clean target in kcmp Makefile
selftests: add .gitignore for vm
selftests: add hugetlbfstest
self-test: fix make clean
selftests: exit 1 on failure
kernel/resource.c: remove the unneeded assignment in function __find_resource
aio: fix wrong comment in aio_complete()
drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
drivers/memstick/host/r592.c: convert to module_pci_driver
drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
pps-gpio: add device-tree binding and support
drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
drivers/parport/share.c: use kzalloc
Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
aoe: update internal version number to v83
aoe: update copyright date
aoe: perform I/O completions in parallel
...
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 2bbd9a73b54c..071de900c824 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -511,7 +511,7 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd, | |||
511 | case LINUX_REBOOT_CMD_HALT: | 511 | case LINUX_REBOOT_CMD_HALT: |
512 | kernel_halt(); | 512 | kernel_halt(); |
513 | do_exit(0); | 513 | do_exit(0); |
514 | panic("cannot halt"); | 514 | panic("cannot halt.\n"); |
515 | 515 | ||
516 | case LINUX_REBOOT_CMD_POWER_OFF: | 516 | case LINUX_REBOOT_CMD_POWER_OFF: |
517 | kernel_power_off(); | 517 | kernel_power_off(); |
@@ -1309,6 +1309,17 @@ out: | |||
1309 | return retval; | 1309 | return retval; |
1310 | } | 1310 | } |
1311 | 1311 | ||
1312 | static void set_special_pids(struct pid *pid) | ||
1313 | { | ||
1314 | struct task_struct *curr = current->group_leader; | ||
1315 | |||
1316 | if (task_session(curr) != pid) | ||
1317 | change_pid(curr, PIDTYPE_SID, pid); | ||
1318 | |||
1319 | if (task_pgrp(curr) != pid) | ||
1320 | change_pid(curr, PIDTYPE_PGID, pid); | ||
1321 | } | ||
1322 | |||
1312 | SYSCALL_DEFINE0(setsid) | 1323 | SYSCALL_DEFINE0(setsid) |
1313 | { | 1324 | { |
1314 | struct task_struct *group_leader = current->group_leader; | 1325 | struct task_struct *group_leader = current->group_leader; |
@@ -1328,7 +1339,7 @@ SYSCALL_DEFINE0(setsid) | |||
1328 | goto out; | 1339 | goto out; |
1329 | 1340 | ||
1330 | group_leader->signal->leader = 1; | 1341 | group_leader->signal->leader = 1; |
1331 | __set_special_pids(sid); | 1342 | set_special_pids(sid); |
1332 | 1343 | ||
1333 | proc_clear_tty(group_leader); | 1344 | proc_clear_tty(group_leader); |
1334 | 1345 | ||
@@ -2355,8 +2366,7 @@ static int do_sysinfo(struct sysinfo *info) | |||
2355 | 2366 | ||
2356 | memset(info, 0, sizeof(struct sysinfo)); | 2367 | memset(info, 0, sizeof(struct sysinfo)); |
2357 | 2368 | ||
2358 | ktime_get_ts(&tp); | 2369 | get_monotonic_boottime(&tp); |
2359 | monotonic_to_bootbased(&tp); | ||
2360 | info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0); | 2370 | info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0); |
2361 | 2371 | ||
2362 | get_avenrun(info->loads, 0, SI_LOAD_SHIFT - FSHIFT); | 2372 | get_avenrun(info->loads, 0, SI_LOAD_SHIFT - FSHIFT); |