diff options
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/jiffies.c | 2 | ||||
-rw-r--r-- | kernel/time/ntp.c | 2 | ||||
-rw-r--r-- | kernel/time/timer_stats.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c index b2fa506667c0..a470154e0408 100644 --- a/kernel/time/jiffies.c +++ b/kernel/time/jiffies.c | |||
@@ -34,7 +34,7 @@ | |||
34 | * inaccuracies caused by missed or lost timer | 34 | * inaccuracies caused by missed or lost timer |
35 | * interrupts and the inability for the timer | 35 | * interrupts and the inability for the timer |
36 | * interrupt hardware to accuratly tick at the | 36 | * interrupt hardware to accuratly tick at the |
37 | * requested HZ value. It is also not reccomended | 37 | * requested HZ value. It is also not recommended |
38 | * for "tick-less" systems. | 38 | * for "tick-less" systems. |
39 | */ | 39 | */ |
40 | #define NSEC_PER_JIFFY ((u32)((((u64)NSEC_PER_SEC)<<8)/ACTHZ)) | 40 | #define NSEC_PER_JIFFY ((u32)((((u64)NSEC_PER_SEC)<<8)/ACTHZ)) |
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 5f1bb8e2008f..f6117a4c7cb8 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -652,6 +652,8 @@ int do_adjtimex(struct timex *txc) | |||
652 | struct timespec delta; | 652 | struct timespec delta; |
653 | delta.tv_sec = txc->time.tv_sec; | 653 | delta.tv_sec = txc->time.tv_sec; |
654 | delta.tv_nsec = txc->time.tv_usec; | 654 | delta.tv_nsec = txc->time.tv_usec; |
655 | if (!capable(CAP_SYS_TIME)) | ||
656 | return -EPERM; | ||
655 | if (!(txc->modes & ADJ_NANO)) | 657 | if (!(txc->modes & ADJ_NANO)) |
656 | delta.tv_nsec *= 1000; | 658 | delta.tv_nsec *= 1000; |
657 | result = timekeeping_inject_offset(&delta); | 659 | result = timekeeping_inject_offset(&delta); |
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c index 2f3b585b8d7d..a5d0a3a85dd8 100644 --- a/kernel/time/timer_stats.c +++ b/kernel/time/timer_stats.c | |||
@@ -236,7 +236,7 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
236 | unsigned int timer_flag) | 236 | unsigned int timer_flag) |
237 | { | 237 | { |
238 | /* | 238 | /* |
239 | * It doesnt matter which lock we take: | 239 | * It doesn't matter which lock we take: |
240 | */ | 240 | */ |
241 | raw_spinlock_t *lock; | 241 | raw_spinlock_t *lock; |
242 | struct entry *entry, input; | 242 | struct entry *entry, input; |