]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
uml-random: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:16:57 +0000 (19:16 +0200)
committerJonathan Corbet <corbet@lwn.net>
Wed, 2 Jul 2008 21:06:26 +0000 (15:06 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/um/drivers/random.c

index 4949044773ba78b93797d43701ab751b0a1bce23..6eabb7022a2d6c1c45a7f62327a50c4b1c88d734 100644 (file)
@@ -7,6 +7,7 @@
  * of the GNU General Public License, incorporated herein by reference.
  */
 #include <linux/sched.h>
+#include <linux/smp_lock.h>
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/interrupt.h>
@@ -33,6 +34,8 @@ static DECLARE_WAIT_QUEUE_HEAD(host_read_wait);
 
 static int rng_dev_open (struct inode *inode, struct file *filp)
 {
+       cycle_kernel_lock();
+
        /* enforce read-only access to this chrdev */
        if ((filp->f_mode & FMODE_READ) == 0)
                return -EINVAL;