aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-11-12 23:45:41 +0100
committerMoyster <oysterized@gmail.com>2016-09-10 12:06:18 +0200
commit2c65c997807fcfae1863809d4b7075e07e7f123b (patch)
tree27865755004c356fb3f5b44dc2987ee70b883462 /lib
parent9c3c1bceded91ab2fb6a0026525f3a6fdf7f006b (diff)
random32: add __init prefix to prandom_start_seed_timer
We only call that in functions annotated with __init, so add __init prefix in prandom_start_seed_timer() as well, so that the kernel can make use of this hint and we can possibly free up resources after it's usage. And since it's an internal function rename it to __prandom_start_seed_timer(). Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/random32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/random32.c b/lib/random32.c
index 82da4f4c3..4f9d5dffc 100644
--- a/lib/random32.c
+++ b/lib/random32.c
@@ -222,7 +222,7 @@ static void __prandom_timer(unsigned long dontcare)
add_timer(&seed_timer);
}
-static void prandom_start_seed_timer(void)
+static void __init __prandom_start_seed_timer(void)
{
set_timer_slack(&seed_timer, HZ);
seed_timer.expires = jiffies + 40 * HZ;
@@ -270,7 +270,7 @@ void prandom_reseed_late(void)
static int __init prandom_reseed(void)
{
__prandom_reseed(false);
- prandom_start_seed_timer();
+ __prandom_start_seed_timer();
return 0;
}
late_initcall(prandom_reseed);