diff options
Diffstat (limited to 'kernel/sys.c')
| -rw-r--r-- | kernel/sys.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 9eb7fcab8df6..e7006eb6c1e4 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
| @@ -444,6 +444,15 @@ SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd, | |||
| 444 | magic2 != LINUX_REBOOT_MAGIC2C)) | 444 | magic2 != LINUX_REBOOT_MAGIC2C)) |
| 445 | return -EINVAL; | 445 | return -EINVAL; |
| 446 | 446 | ||
| 447 | /* | ||
| 448 | * If pid namespaces are enabled and the current task is in a child | ||
| 449 | * pid_namespace, the command is handled by reboot_pid_ns() which will | ||
| 450 | * call do_exit(). | ||
| 451 | */ | ||
| 452 | ret = reboot_pid_ns(task_active_pid_ns(current), cmd); | ||
| 453 | if (ret) | ||
| 454 | return ret; | ||
| 455 | |||
| 447 | /* Instead of trying to make the power_off code look like | 456 | /* Instead of trying to make the power_off code look like |
| 448 | * halt when pm_power_off is not set do it the easy way. | 457 | * halt when pm_power_off is not set do it the easy way. |
| 449 | */ | 458 | */ |
