From: Jonathan Corbet Date: Fri, 16 May 2008 19:47:50 +0000 (-0600) Subject: vcs: BKL pushdown X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f97259e35de1f99ba0ac19383408e247fd763cf0;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git vcs: BKL pushdown Add explicit BKL to vcs_open(). Signed-off-by: Jonathan Corbet --- 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 @@ #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 = {