diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 2 | ||||
-rw-r--r-- | kernel/sys.c | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 7ce2ebe84796..4308d75f0fa5 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -987,6 +987,8 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
987 | p->prev_utime = cputime_zero; | 987 | p->prev_utime = cputime_zero; |
988 | p->prev_stime = cputime_zero; | 988 | p->prev_stime = cputime_zero; |
989 | 989 | ||
990 | p->default_timer_slack_ns = current->timer_slack_ns; | ||
991 | |||
990 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 992 | #ifdef CONFIG_DETECT_SOFTLOCKUP |
991 | p->last_switch_count = 0; | 993 | p->last_switch_count = 0; |
992 | p->last_switch_timestamp = 0; | 994 | p->last_switch_timestamp = 0; |
diff --git a/kernel/sys.c b/kernel/sys.c index 038a7bc0901d..1b96401a0576 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1727,6 +1727,16 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
1727 | case PR_SET_TSC: | 1727 | case PR_SET_TSC: |
1728 | error = SET_TSC_CTL(arg2); | 1728 | error = SET_TSC_CTL(arg2); |
1729 | break; | 1729 | break; |
1730 | case PR_GET_TIMERSLACK: | ||
1731 | error = current->timer_slack_ns; | ||
1732 | break; | ||
1733 | case PR_SET_TIMERSLACK: | ||
1734 | if (arg2 <= 0) | ||
1735 | current->timer_slack_ns = | ||
1736 | current->default_timer_slack_ns; | ||
1737 | else | ||
1738 | current->timer_slack_ns = arg2; | ||
1739 | break; | ||
1730 | default: | 1740 | default: |
1731 | error = -EINVAL; | 1741 | error = -EINVAL; |
1732 | break; | 1742 | break; |