Skip to content

Commit

Permalink
vcs: BKL pushdown
Browse files Browse the repository at this point in the history
Add explicit BKL to vcs_open().

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 609f9e9 commit f97259e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/char/vc_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit f97259e

Please sign in to comment.