Skip to content

Commit a9c4e8f

Browse files
arndbJonathan Corbet
authored andcommitted
hw-random: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 48b8188 commit a9c4e8f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/char/hw_random/core.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <linux/kernel.h>
3838
#include <linux/fs.h>
3939
#include <linux/sched.h>
40+
#include <linux/smp_lock.h>
4041
#include <linux/init.h>
4142
#include <linux/miscdevice.h>
4243
#include <linux/delay.h>
@@ -86,6 +87,7 @@ static int rng_dev_open(struct inode *inode, struct file *filp)
8687
return -EINVAL;
8788
if (filp->f_mode & FMODE_WRITE)
8889
return -EINVAL;
90+
cycle_kernel_lock();
8991
return 0;
9092
}
9193

0 commit comments

Comments
 (0)