From: Arnd Bergmann Date: Tue, 20 May 2008 17:16:17 +0000 (+0200) Subject: monreader: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~46 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ce46a435a3ac9e706d09a3075cbc60ed72d37db;p=linux-2.6 monreader: BKL pushdown [jmc: added ] Signed-off-by: Arnd Bergmann Signed-off-by: Jonathan Corbet --- diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index 1e1f50655b..dc4710e64e 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -340,6 +341,7 @@ static int mon_open(struct inode *inode, struct file *filp) /* * only one user allowed */ + lock_kernel(); rc = -EBUSY; if (test_and_set_bit(MON_IN_USE, &mon_in_use)) goto out; @@ -377,6 +379,7 @@ static int mon_open(struct inode *inode, struct file *filp) } P_INFO("open, established connection to *MONITOR service\n\n"); filp->private_data = monpriv; + unlock_kernel(); return nonseekable_open(inode, filp); out_path: @@ -386,6 +389,7 @@ out_priv: out_use: clear_bit(MON_IN_USE, &mon_in_use); out: + unlock_kernel(); return rc; }