diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 19:16:17 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-02 15:06:04 -0600 |
commit | 6ce46a435a3ac9e706d09a3075cbc60ed72d37db (patch) | |
tree | 91cc328ba211ec377c29a460bd9dc10c2374fcdc /drivers/s390/char | |
parent | 77149367dade50af8370420265bd4f818cde8afd (diff) | |
download | kernel-crypto-6ce46a435a3ac9e706d09a3075cbc60ed72d37db.tar.gz kernel-crypto-6ce46a435a3ac9e706d09a3075cbc60ed72d37db.tar.xz kernel-crypto-6ce46a435a3ac9e706d09a3075cbc60ed72d37db.zip |
monreader: BKL pushdown
[jmc: added <linux/smp_lock.h>]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/monreader.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index 1e1f50655bb..dc4710e64e0 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c @@ -11,6 +11,7 @@ #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/init.h> +#include <linux/smp_lock.h> #include <linux/errno.h> #include <linux/types.h> #include <linux/kernel.h> @@ -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; } |