[COMMON] hw_random: make khwrngd freezable
authorKeunyoung Park <keun0.park@samsung.com>
Mon, 29 Jan 2018 04:24:09 +0000 (13:24 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:12 +0000 (20:22 +0300)
Change-Id: I8bc0b1561dc8b3d36fec860b0b969129326c334d
Signed-off-by: Keunyoung Park <keun0.park@samsung.com>
drivers/char/hw_random/core.c

index 303fd55f9be05166a1eeeebce8a7961a8d7fd869..76ad3887f3a5349ce404dc668cdc6ced92b72ace 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
+#include <linux/freezer.h>
 
 #define RNG_MODULE_NAME                "hw_random"
 
@@ -396,6 +397,8 @@ static int hwrng_fillfn(void *unused)
 {
        long rc;
 
+       set_freezable();
+
        while (!kthread_should_stop()) {
                struct hwrng *rng;