فهرست منبع

hw-random: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann 17 سال پیش
والد
کامیت
a9c4e8f74b
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      drivers/char/hw_random/core.c

+ 2 - 0
drivers/char/hw_random/core.c

@@ -37,6 +37,7 @@
 #include <linux/kernel.h>
 #include <linux/fs.h>
 #include <linux/sched.h>
+#include <linux/smp_lock.h>
 #include <linux/init.h>
 #include <linux/miscdevice.h>
 #include <linux/delay.h>
@@ -86,6 +87,7 @@ static int rng_dev_open(struct inode *inode, struct file *filp)
 		return -EINVAL;
 	if (filp->f_mode & FMODE_WRITE)
 		return -EINVAL;
+	cycle_kernel_lock();
 	return 0;
 }