diff options
Diffstat (limited to 'drivers/char/mixcomwd.c')
-rw-r--r-- | drivers/char/mixcomwd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/mixcomwd.c b/drivers/char/mixcomwd.c index 6352d6f73..1daff0de7 100644 --- a/drivers/char/mixcomwd.c +++ b/drivers/char/mixcomwd.c @@ -43,6 +43,7 @@ #include <linux/watchdog.h> #include <linux/reboot.h> #include <linux/init.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/io.h> @@ -100,9 +101,11 @@ static int mixcomwd_open(struct inode *inode, struct file *file) static int mixcomwd_release(struct inode *inode, struct file *file) { + lock_kernel(); #ifndef CONFIG_WATCHDOG_NOWAYOUT if(mixcomwd_timer_alive) { printk(KERN_ERR "mixcomwd: release called while internal timer alive"); + unlock_kernel(); return -EBUSY; } init_timer(&mixcomwd_timer); @@ -114,6 +117,7 @@ static int mixcomwd_release(struct inode *inode, struct file *file) #endif clear_bit(0,&mixcomwd_opened); + unlock_kernel(); return 0; } |