summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 05:23:37 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 05:23:37 +0100
commit7005cd39707ba59b5b1d3e70da2c448d3235eb3e (patch)
tree89ed68e2cfd68f038d58f86a0eb5fe7eea279103 /kernel
parentMerge tag 'xtensa-20121218' of git://github.com/czankel/xtensa-linux (diff)
parentrandom: Mix cputime from each thread that exits to the pool (diff)
downloadlinux-7005cd39707ba59b5b1d3e70da2c448d3235eb3e.tar.xz
linux-7005cd39707ba59b5b1d3e70da2c448d3235eb3e.zip
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random
Pull random updates from Ted Ts'o: "A few /dev/random improvements for the v3.8 merge window." * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: Mix cputime from each thread that exits to the pool random: prime last_data value per fips requirements random: fix debug format strings random: make it possible to enable debugging without rebuild
Diffstat (limited to 'kernel')
-rw-r--r--kernel/posix-cpu-timers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index d73840271dce..a278cad1d5d6 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -9,6 +9,7 @@
#include <asm/uaccess.h>
#include <linux/kernel_stat.h>
#include <trace/events/timer.h>
+#include <linux/random.h>
/*
* Called after updating RLIMIT_CPU to run cpu timer and update
@@ -470,6 +471,8 @@ static void cleanup_timers(struct list_head *head,
*/
void posix_cpu_timers_exit(struct task_struct *tsk)
{
+ add_device_randomness((const void*) &tsk->se.sum_exec_runtime,
+ sizeof(unsigned long long));
cleanup_timers(tsk->cpu_timers,
tsk->utime, tsk->stime, tsk->se.sum_exec_runtime);