From f97259e35de1f99ba0ac19383408e247fd763cf0 Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Fri, 16 May 2008 13:47:50 -0600 Subject: [PATCH] vcs: BKL pushdown Add explicit BKL to vcs_open(). Signed-off-by: Jonathan Corbet --- drivers/char/vc_screen.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index 83aeedda20..eebfad2777 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -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 = { -- 2.39.5