patch-2.4.0-test4 linux/drivers/char/mixcomwd.c
Next file: linux/drivers/char/msp3400.c
Previous file: linux/drivers/char/lp.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Wed Jul 12 21:58:42 2000
- Orig file:
v2.4.0-test3/linux/drivers/char/mixcomwd.c
- Orig date:
Fri Jun 23 21:55:08 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/char/mixcomwd.c linux/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_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 @@
#endif
clear_bit(0,&mixcomwd_opened);
+ unlock_kernel();
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)