summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 19:16:18 +0200
committerJonathan Corbet <corbet@lwn.net>2008-07-02 15:06:23 -0600
commitdca67e9d3db27b090259b696e1166615f40099e2 (patch)
tree64654da7e8d990ea7a7bc8fad61ab00804c82a09 /drivers
parent6ce46a435a3ac9e706d09a3075cbc60ed72d37db (diff)
downloadlinux-dca67e9d3db27b090259b696e1166615f40099e2.tar.bz2
monwriter: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/char/monwriter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c
index a86c0534cd49..4d71aa8c1a79 100644
--- a/drivers/s390/char/monwriter.c
+++ b/drivers/s390/char/monwriter.c
@@ -12,6 +12,7 @@
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/errno.h>
+#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
@@ -179,10 +180,12 @@ static int monwrite_open(struct inode *inode, struct file *filp)
monpriv = kzalloc(sizeof(struct mon_private), GFP_KERNEL);
if (!monpriv)
return -ENOMEM;
+ lock_kernel();
INIT_LIST_HEAD(&monpriv->list);
monpriv->hdr_to_read = sizeof(monpriv->hdr);
mutex_init(&monpriv->thread_mutex);
filp->private_data = monpriv;
+ unlock_kernel();
return nonseekable_open(inode, filp);
}