vcs: BKL pushdown
Add explicit BKL to vcs_open(). Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
609f9e92b5
commit
f97259e35d
@ -34,6 +34,7 @@
|
|||||||
#include <linux/kbd_kern.h>
|
#include <linux/kbd_kern.h>
|
||||||
#include <linux/console.h>
|
#include <linux/console.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include <linux/smp_lock.h>
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <asm/byteorder.h>
|
#include <asm/byteorder.h>
|
||||||
@ -460,9 +461,13 @@ static int
|
|||||||
vcs_open(struct inode *inode, struct file *filp)
|
vcs_open(struct inode *inode, struct file *filp)
|
||||||
{
|
{
|
||||||
unsigned int currcons = iminor(inode) & 127;
|
unsigned int currcons = iminor(inode) & 127;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
if(currcons && !vc_cons_allocated(currcons-1))
|
if(currcons && !vc_cons_allocated(currcons-1))
|
||||||
return -ENXIO;
|
ret = -ENXIO;
|
||||||
return 0;
|
unlock_kernel();
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct file_operations vcs_fops = {
|
static const struct file_operations vcs_fops = {
|
||||||
|
Loading…
Reference in New Issue
Block a user