]> err.no Git - linux-2.6/commitdiff
hw-random: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:16:00 +0000 (19:16 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 20 Jun 2008 20:05:57 +0000 (14:05 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/char/hw_random/core.c

index 662d60e44e9a02924888d74499fbe91b268423f5..e5d583c84e4f864ae31cb95534bd5befe6291ed6 100644 (file)
@@ -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;
 }