]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
vmcp: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:16:59 +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>
drivers/s390/char/vmcp.c

index 2f419b0ea628bf1dd47ca0385f54f95bbf808235..bf3dc6e0e33af13f1468dfe3fe26e89b67d13dff 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/miscdevice.h>
 #include <linux/module.h>
+#include <linux/smp_lock.h>
 #include <asm/cpcmd.h>
 #include <asm/debug.h>
 #include <asm/uaccess.h>
@@ -39,11 +40,14 @@ static int vmcp_open(struct inode *inode, struct file *file)
        session = kmalloc(sizeof(*session), GFP_KERNEL);
        if (!session)
                return -ENOMEM;
+
+       lock_kernel();
        session->bufsize = PAGE_SIZE;
        session->response = NULL;
        session->resp_size = 0;
        mutex_init(&session->mutex);
        file->private_data = session;
+       unlock_kernel();
        return nonseekable_open(inode, file);
 }