Commit 6c111d88 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet
Browse files

vmcp: BKL pushdown



Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent ffe83733
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);
}