summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 19:17:01 +0200
committerJonathan Corbet <corbet@lwn.net>2008-07-02 15:06:26 -0600
commit3e0420f066c632e135939ccf218ae793e02dccd7 (patch)
tree64a0803cda185a704a8d44e831d195c0667708cc /drivers/s390
parent6c111d886317513605c459cbe8d1970fab732c90 (diff)
downloadlinux-stable-3e0420f066c632e135939ccf218ae793e02dccd7.tar.gz
linux-stable-3e0420f066c632e135939ccf218ae793e02dccd7.tar.bz2
linux-stable-3e0420f066c632e135939ccf218ae793e02dccd7.zip
vmwatchdog: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/vmwatchdog.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c
index 19f8389291b6..ee80e936d514 100644
--- a/drivers/s390/char/vmwatchdog.c
+++ b/drivers/s390/char/vmwatchdog.c
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/watchdog.h>
+#include <linux/smp_lock.h>
#include <asm/ebcdic.h>
#include <asm/io.h>
@@ -131,11 +132,15 @@ static int __init vmwdt_probe(void)
static int vmwdt_open(struct inode *i, struct file *f)
{
int ret;
- if (test_and_set_bit(0, &vmwdt_is_open))
+ lock_kernel();
+ if (test_and_set_bit(0, &vmwdt_is_open)) {
+ unlock_kernel();
return -EBUSY;
+ }
ret = vmwdt_keepalive();
if (ret)
clear_bit(0, &vmwdt_is_open);
+ unlock_kernel();
return ret ? ret : nonseekable_open(i, f);
}