summaryrefslogtreecommitdiff
path: root/kernel/time/timer.c
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2020-08-23 00:37:37 +0300
committerMichael Bestas <mkbestas@lineageos.org>2020-08-23 00:37:37 +0300
commit250f46158452aac57109fd256ccd675f87c6c07a (patch)
tree60e02a035fda8c20c2773becd457ec0bb5a55dd6 /kernel/time/timer.c
parent87d399cdabf1a0090ea16259bd747f162dd194c9 (diff)
parent59f04f292e871fb7fd7b3425d7fd3fd489a44078 (diff)
Merge branch 'android-4.4-p' of https://android.googlesource.com/kernel/common into lineage-17.1-caf-msm8998
This brings LA.UM.8.4.r1-05900-8x98.0 up to date with https://android.googlesource.com/kernel/common/ android-4.4-p at commit: 59f04f292e871 ANDROID: fix a bug in quota2 Conflicts: Makefile fs/ext4/inode.c fs/f2fs/dir.c Change-Id: Ic71b44a02908cf633d96114f0ff745cf1e1186de
Diffstat (limited to 'kernel/time/timer.c')
-rw-r--r--kernel/time/timer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 903705687b52..539070e3ae3a 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -42,6 +42,7 @@
#include <linux/sched/sysctl.h>
#include <linux/slab.h>
#include <linux/compat.h>
+#include <linux/random.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
@@ -1469,6 +1470,13 @@ void update_process_times(int user_tick)
#endif
scheduler_tick();
run_posix_cpu_timers(p);
+
+ /* The current CPU might make use of net randoms without receiving IRQs
+ * to renew them often enough. Let's update the net_rand_state from a
+ * non-constant value that's not affine to the number of calls to make
+ * sure it's updated when there's some activity (we don't care in idle).
+ */
+ this_cpu_add(net_rand_state.s1, rol32(jiffies, 24) + user_tick);
}
/*