diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-29 08:46:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-29 08:47:05 -0400 |
commit | e7fd5d4b3d240f42c30a9e3d20a4689c4d3a795a (patch) | |
tree | 4ba588631dd8189a818a91c9e3976526071178b6 /kernel/sys.c | |
parent | 1130b0296184bc21806225fd06d533515a99d2db (diff) | |
parent | 56a50adda49b2020156616c4eb15353e0f9ad7de (diff) |
Merge branch 'linus' into perfcounters/core
Merge reason: This brach was on -rc1, refresh it to almost-rc4 to pick up
the latest upstream fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 14c4c5613118..438d99a38c87 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -361,6 +361,7 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd, | |||
361 | void __user *, arg) | 361 | void __user *, arg) |
362 | { | 362 | { |
363 | char buffer[256]; | 363 | char buffer[256]; |
364 | int ret = 0; | ||
364 | 365 | ||
365 | /* We only trust the superuser with rebooting the system. */ | 366 | /* We only trust the superuser with rebooting the system. */ |
366 | if (!capable(CAP_SYS_BOOT)) | 367 | if (!capable(CAP_SYS_BOOT)) |
@@ -398,7 +399,7 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd, | |||
398 | kernel_halt(); | 399 | kernel_halt(); |
399 | unlock_kernel(); | 400 | unlock_kernel(); |
400 | do_exit(0); | 401 | do_exit(0); |
401 | break; | 402 | panic("cannot halt"); |
402 | 403 | ||
403 | case LINUX_REBOOT_CMD_POWER_OFF: | 404 | case LINUX_REBOOT_CMD_POWER_OFF: |
404 | kernel_power_off(); | 405 | kernel_power_off(); |
@@ -418,29 +419,22 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd, | |||
418 | 419 | ||
419 | #ifdef CONFIG_KEXEC | 420 | #ifdef CONFIG_KEXEC |
420 | case LINUX_REBOOT_CMD_KEXEC: | 421 | case LINUX_REBOOT_CMD_KEXEC: |
421 | { | 422 | ret = kernel_kexec(); |
422 | int ret; | 423 | break; |
423 | ret = kernel_kexec(); | ||
424 | unlock_kernel(); | ||
425 | return ret; | ||
426 | } | ||
427 | #endif | 424 | #endif |
428 | 425 | ||
429 | #ifdef CONFIG_HIBERNATION | 426 | #ifdef CONFIG_HIBERNATION |
430 | case LINUX_REBOOT_CMD_SW_SUSPEND: | 427 | case LINUX_REBOOT_CMD_SW_SUSPEND: |
431 | { | 428 | ret = hibernate(); |
432 | int ret = hibernate(); | 429 | break; |
433 | unlock_kernel(); | ||
434 | return ret; | ||
435 | } | ||
436 | #endif | 430 | #endif |
437 | 431 | ||
438 | default: | 432 | default: |
439 | unlock_kernel(); | 433 | ret = -EINVAL; |
440 | return -EINVAL; | 434 | break; |
441 | } | 435 | } |
442 | unlock_kernel(); | 436 | unlock_kernel(); |
443 | return 0; | 437 | return ret; |
444 | } | 438 | } |
445 | 439 | ||
446 | static void deferred_cad(struct work_struct *dummy) | 440 | static void deferred_cad(struct work_struct *dummy) |