Commit f97259e3 authored by Jonathan Corbet's avatar Jonathan Corbet

vcs: BKL pushdown

Add explicit BKL to vcs_open().
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 609f9e92
......@@ -34,6 +34,7 @@
#include <linux/kbd_kern.h>
#include <linux/console.h>
#include <linux/device.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/byteorder.h>
......@@ -460,9 +461,13 @@ static int
vcs_open(struct inode *inode, struct file *filp)
{
unsigned int currcons = iminor(inode) & 127;
int ret = 0;
lock_kernel();
if(currcons && !vc_cons_allocated(currcons-1))
return -ENXIO;
return 0;
ret = -ENXIO;
unlock_kernel();
return ret;
}
static const struct file_operations vcs_fops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment