aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-16 15:47:50 -0400
committerJonathan Corbet <corbet@lwn.net>2008-06-20 16:05:51 -0400
commitf97259e35de1f99ba0ac19383408e247fd763cf0 (patch)
treeac5bcc0a1e5d188241b3bff7f12af9284250a917 /drivers/char
parent609f9e92b570f390a457a81effe0af6b758dc582 (diff)
vcs: BKL pushdown
Add explicit BKL to vcs_open(). Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/char')
-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 83aeedda200c..eebfad2777d2 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -34,6 +34,7 @@
34#include <linux/kbd_kern.h> 34#include <linux/kbd_kern.h>
35#include <linux/console.h> 35#include <linux/console.h>
36#include <linux/device.h> 36#include <linux/device.h>
37#include <linux/smp_lock.h>
37 38
38#include <asm/uaccess.h> 39#include <asm/uaccess.h>
39#include <asm/byteorder.h> 40#include <asm/byteorder.h>
@@ -460,9 +461,13 @@ static int
460vcs_open(struct inode *inode, struct file *filp) 461vcs_open(struct inode *inode, struct file *filp)
461{ 462{
462 unsigned int currcons = iminor(inode) & 127; 463 unsigned int currcons = iminor(inode) & 127;
464 int ret = 0;
465
466 lock_kernel();
463 if(currcons && !vc_cons_allocated(currcons-1)) 467 if(currcons && !vc_cons_allocated(currcons-1))
464 return -ENXIO; 468 ret = -ENXIO;
465 return 0; 469 unlock_kernel();
470 return ret;
466} 471}
467 472
468static const struct file_operations vcs_fops = { 473static const struct file_operations vcs_fops = {