提交 7eb500d1 编写于 作者: A Arnd Bergmann 提交者: Jonathan Corbet

uml-random: BKL pushdown

Signed-off-by: NArnd Bergmann <arnd@arndb.de>
上级 bd6859fe
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* of the GNU General Public License, incorporated herein by reference. * of the GNU General Public License, incorporated herein by reference.
*/ */
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -33,6 +34,8 @@ static DECLARE_WAIT_QUEUE_HEAD(host_read_wait); ...@@ -33,6 +34,8 @@ static DECLARE_WAIT_QUEUE_HEAD(host_read_wait);
static int rng_dev_open (struct inode *inode, struct file *filp) static int rng_dev_open (struct inode *inode, struct file *filp)
{ {
cycle_kernel_lock();
/* enforce read-only access to this chrdev */ /* enforce read-only access to this chrdev */
if ((filp->f_mode & FMODE_READ) == 0) if ((filp->f_mode & FMODE_READ) == 0)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册