aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 13:16:57 -0400
committerJonathan Corbet <corbet@lwn.net>2008-07-02 17:06:26 -0400
commit7eb500d1a0408c37d0c0360f066f8b7701835d68 (patch)
tree5ef59f59e2f79dcb35a5c8947d41ce1855811ca6 /arch/um
parentbd6859fe836491d20ea6e57fee93e0e08ee69443 (diff)
uml-random: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/random.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index 4949044773ba..6eabb7022a2d 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -7,6 +7,7 @@
7 * of the GNU General Public License, incorporated herein by reference. 7 * of the GNU General Public License, incorporated herein by reference.
8 */ 8 */
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include <linux/smp_lock.h>
10#include <linux/module.h> 11#include <linux/module.h>
11#include <linux/fs.h> 12#include <linux/fs.h>
12#include <linux/interrupt.h> 13#include <linux/interrupt.h>
@@ -33,6 +34,8 @@ static DECLARE_WAIT_QUEUE_HEAD(host_read_wait);
33 34
34static int rng_dev_open (struct inode *inode, struct file *filp) 35static int rng_dev_open (struct inode *inode, struct file *filp)
35{ 36{
37 cycle_kernel_lock();
38
36 /* enforce read-only access to this chrdev */ 39 /* enforce read-only access to this chrdev */
37 if ((filp->f_mode & FMODE_READ) == 0) 40 if ((filp->f_mode & FMODE_READ) == 0)
38 return -EINVAL; 41 return -EINVAL;