summaryrefslogtreecommitdiffstats
path: root/drivers/char/vc_screen.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-16 13:47:50 -0600
committerJonathan Corbet <corbet@lwn.net>2008-06-20 14:05:51 -0600
commitf97259e35de1f99ba0ac19383408e247fd763cf0 (patch)
treeac5bcc0a1e5d188241b3bff7f12af9284250a917 /drivers/char/vc_screen.c
parent609f9e92b570f390a457a81effe0af6b758dc582 (diff)
vcs: BKL pushdown
Add explicit BKL to vcs_open(). Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/char/vc_screen.c')
-rw-r--r--drivers/char/vc_screen.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index 83aeedda200..eebfad2777d 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -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 = {