aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/crypto/prng.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-15 13:45:59 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-15 13:45:59 +0200
commit91d0322bef047e2916b3e52741411bffc63929cb (patch)
tree44c4fd13cc17755a6db8a3d70cffb86e57a838dc /arch/s390/crypto/prng.c
parent065cb3dfe24978651caedfa54da585388ad15dde (diff)
parent50515af207d410c9f228380e529c56f43c3de0bd (diff)
Merge branch 'linus' into x86/urgent
Diffstat (limited to 'arch/s390/crypto/prng.c')
-rw-r--r--arch/s390/crypto/prng.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c
index 0cfefddd837..eca724d229e 100644
--- a/arch/s390/crypto/prng.c
+++ b/arch/s390/crypto/prng.c
@@ -6,6 +6,7 @@
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/kernel.h>
+#include <linux/smp_lock.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -48,6 +49,7 @@ static unsigned char parm_block[32] = {
static int prng_open(struct inode *inode, struct file *file)
{
+ cycle_kernel_lock();
return nonseekable_open(inode, file);
}
@@ -185,11 +187,8 @@ static int __init prng_init(void)
prng_seed(16);
ret = misc_register(&prng_dev);
- if (ret) {
- printk(KERN_WARNING
- "Could not register misc device for PRNG.\n");
+ if (ret)
goto out_buf;
- }
return 0;
out_buf: